From 4f120cb103db3987e01ece48648c844218b91ff2 Mon Sep 17 00:00:00 2001 From: "Andrew W. Nosenko" Date: Fri, 13 Apr 2012 14:48:10 +0300 Subject: Define _GNU_SOURCE in addition to the __BSD_VISIBLE on freebsd-like hosts Define _GNU_SOURCE in addition to the __BSD_VISIBLE on the freebsd-like hosts. It made in hope to cover cases and obtain the full power of underlying kernel on "hybrid" systems like Debian GNU/kFreeBSD, when GLibc (or derived) library lives on top of FreeBSD kernel. On the "real" FreeBSD it only enables getline(3), and therefore, should not hurt. * configure.ac: Define _GNU_SOURCE in addition to the __BSD_VISIBLE for cover GLibc (or derived) on top of FreeBSD kernel cases, as it is in Debian GNU/kFreeBSD case. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 42c6332..9a17fe6 100644 --- a/configure.ac +++ b/configure.ac @@ -121,7 +121,10 @@ AS_CASE(["${host_os}"], ], [*freebsd*], [ # Define on FreeBSD to enable all library features - CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" + # -D_GNU_SOURCE should not hurt on the "real" FreeBSD, it just + # enables getline(3), but may help on Debian GNU/kFreeBSD, where + # libc is GNU Libc or derived. + CPPFLAGS="-D__BSD_VISIBLE -D_GNU_SOURCE $CPPFLAGS" AC_DEFINE([XS_HAVE_FREEBSD], [1], [Have FreeBSD OS]) ], [*darwin*], [ -- cgit v1.2.3