diff --git a/configure b/configure index 62cf8078..403fcdf7 100755 --- a/configure +++ b/configure @@ -8064,6 +8064,15 @@ fi +case "$host_os" in + *) + # AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread]) + +$as_echo "#define _BSD_SOURCE 1" >>confdefs.h + + ;; +esac + ALL_LDFLAGS="$LDFLAGS $SQLITE3_LDFLAGS" static_lib_list="libncurses.a libreadline.a libsqlite3.a libz.a libtinfo.a" diff --git a/configure.ac b/configure.ac index 1746fb9a..2b69cffc 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,13 @@ AX_PATH_LIB_READLINE LNAV_WITH_SQLITE3("3.0.0") +case "$host_os" in + *) + # AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread]) + AC_DEFINE([_BSD_SOURCE], [1], [Need pread]) + ;; +esac + ALL_LDFLAGS="$LDFLAGS $SQLITE3_LDFLAGS" static_lib_list="libncurses.a libreadline.a libsqlite3.a libz.a libtinfo.a" diff --git a/src/config.h.in b/src/config.h.in index 4593e536..5010ea21 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -161,3 +161,6 @@ /* Version number of package */ #undef VERSION + +/* Need pread */ +#undef _BSD_SOURCE