1Define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS conditionally 2 3In order to avoid ugly warnings at compile time, only define 4_LARGEFILE_SOURCE and _FILE_OFFSET_BITS if they have not already been 5defined through the build command line. 6 7Avoids: 8 9 In file included from redis.h:33:0, 10 from migrate.c:1: 11 fmacros.h:45:0: warning: "_LARGEFILE_SOURCE" redefined 12 <command-line>:0:0: note: this is the location of the previous definition 13 14Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 15 16Index: redis-2.6.11/src/fmacros.h 17=================================================================== 18--- redis-2.6.11.orig/src/fmacros.h 2013-03-25 22:09:15.000000000 +0100 19+++ redis-2.6.11/src/fmacros.h 2013-03-25 22:09:40.000000000 +0100 20@@ -42,7 +42,12 @@ 21 #define _XOPEN_SOURCE 22 #endif 23 24+#ifndef _LARGEFILE_SOURCE 25 #define _LARGEFILE_SOURCE 26+#endif 27+ 28+#ifndef _FILE_OFFSET_BITS 29 #define _FILE_OFFSET_BITS 64 30+#endif 31 32 #endif 33