Skip to content

Commit

Permalink
m4/acinclude.m4: fix detection of fseeko/ftello on netBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 30, 2021
1 parent 8d613b4 commit 3f41090
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions m4/acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ AC_DEFUN([AC_UNIX_STDIO_64],
rm -rf conftest*
fi
dnl Needed for netBSD
if test x"$HAVE_UNIX_STDIO_64" = x"" ; then
echo '#include <stdio.h>' > conftest.c
echo 'int main() { off_t off=0; fseeko(NULL, off, SEEK_SET); off = ftello(NULL); return (int)off; }' >> conftest.c
if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
HAVE_UNIX_STDIO_64=yes
VSI_FTELL64=ftello
VSI_FSEEK64=fseeko
fi
rm -rf conftest*
fi
if test x"$HAVE_UNIX_STDIO_64" = x"yes" ; then
AC_MSG_RESULT([yes])
Expand Down

0 comments on commit 3f41090

Please sign in to comment.