summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Sauthoff <mail@georg.so>2016-08-27 08:32:21 (GMT)
committerGeorg Sauthoff <mail@georg.so>2016-08-27 13:24:33 (GMT)
commit584e1fe92ade602404d668a9d83e9264709d5dbe (patch)
tree0b55a240688e0f2e58544f541d1b9420385433ae
parent5bd3eaa481f4446b03a062d12119ef11e0f46653 (diff)
downloadlz4-584e1fe92ade602404d668a9d83e9264709d5dbe.zip
lz4-584e1fe92ade602404d668a9d83e9264709d5dbe.tar.gz
lz4-584e1fe92ade602404d668a9d83e9264709d5dbe.tar.bz2
request POSIX.2001 definitions for fileno()
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.
-rw-r--r--programs/lz4cli.c3
1 files changed, 2 insertions, 1 deletions
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 <stdio.h> on unix */
+/* cf. http://man7.org/linux/man-pages/man7/feature_test_macros.7.html */
+#define _XOPEN_VERSION 600 /* POSIX.2001, for fileno() within <stdio.h> on unix */
/****************************