0002-largefile-conditional-define.patch 955 B

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