From 584e1fe92ade602404d668a9d83e9264709d5dbe Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Sat, 27 Aug 2016 10:32:21 +0200 Subject: request POSIX.2001 definitions for fileno() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this also fixes compilation on Solaris 10 cf. feature_test_macros(7) Linux man page: > _POSIX_SOURCE > Defining this obsolete macro with any value is equivalent to definā€ > ing _POSIX_C_SOURCE with the value 1. > > Since this macro is obsolete, its usage is generally not documented > when discussing feature test macro requirements in the man pages. --- programs/lz4cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/lz4cli.c b/programs/lz4cli.c index b5b244e..12d48d1 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -49,7 +49,8 @@ # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ #endif -#define _POSIX_SOURCE 1 /* for fileno() within on unix */ +/* cf. http://man7.org/linux/man-pages/man7/feature_test_macros.7.html */ +#define _XOPEN_VERSION 600 /* POSIX.2001, for fileno() within on unix */ /**************************** -- cgit v0.12