Avoid possible `_XOPEN_SOURCE` redefinition warning

This commit is contained in:
Mike Gelfand 2015-06-23 21:16:33 +00:00
parent 45b73a7866
commit 6101a69957
1 changed files with 5 additions and 1 deletions

View File

@ -7,11 +7,15 @@
* $Id$
*/
#if defined (HAVE_POSIX_FADVISE) && (!defined (_XOPEN_SOURCE) || _XOPEN_SOURCE < 600)
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <string.h> /* memcmp () */
#include <stdlib.h> /* free () */
#ifdef HAVE_POSIX_FADVISE
#define _XOPEN_SOURCE 600
#include <fcntl.h> /* posix_fadvise () */
#endif