From 6101a699572faeb81009f0db1e782c01e28af253 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Tue, 23 Jun 2015 21:16:33 +0000 Subject: [PATCH] Avoid possible `_XOPEN_SOURCE` redefinition warning --- libtransmission/verify.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtransmission/verify.c b/libtransmission/verify.c index b034a9d04..f0882d7bc 100644 --- a/libtransmission/verify.c +++ b/libtransmission/verify.c @@ -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 /* memcmp () */ #include /* free () */ #ifdef HAVE_POSIX_FADVISE - #define _XOPEN_SOURCE 600 #include /* posix_fadvise () */ #endif