valgrind-3.7.0-largefile.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [PATCH] valgrind: don't enable largefile support unconditionally on uClibc
  2. uClibc can be compiled without largefile support (and errors out if
  3. _FILE_OFFSET_BITS is set to 64), so don't define it if that combination
  4. is detected.
  5. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  6. Index: valgrind-3.7.0/coregrind/m_initimg/initimg-linux.c
  7. ===================================================================
  8. --- valgrind-3.7.0.orig/coregrind/m_initimg/initimg-linux.c 2011-10-26 23:24:43.000000000 +0200
  9. +++ valgrind-3.7.0/coregrind/m_initimg/initimg-linux.c 2011-12-22 14:53:12.798185055 +0100
  10. @@ -55,7 +55,11 @@
  11. /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
  12. #define _GNU_SOURCE
  13. +#include <features.h>
  14. +/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
  15. +#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
  16. #define _FILE_OFFSET_BITS 64
  17. +#endif
  18. /* This is for ELF types etc, and also the AT_ constants. */
  19. #include <elf.h>
  20. /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
  21. Index: valgrind-3.7.0/coregrind/m_main.c
  22. ===================================================================
  23. --- valgrind-3.7.0.orig/coregrind/m_main.c 2011-10-26 23:24:45.000000000 +0200
  24. +++ valgrind-3.7.0/coregrind/m_main.c 2011-12-22 14:53:12.798185055 +0100
  25. @@ -2743,7 +2743,11 @@
  26. /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
  27. #define _GNU_SOURCE
  28. +#include <features.h>
  29. +/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
  30. +#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
  31. #define _FILE_OFFSET_BITS 64
  32. +#endif
  33. /* This is in order to get AT_NULL and AT_PAGESIZE. */
  34. #include <elf.h>
  35. /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
  36. Index: valgrind-3.7.0/coregrind/m_ume/elf.c
  37. ===================================================================
  38. --- valgrind-3.7.0.orig/coregrind/m_ume/elf.c 2011-10-26 23:24:41.000000000 +0200
  39. +++ valgrind-3.7.0/coregrind/m_ume/elf.c 2011-12-22 14:53:12.798185055 +0100
  40. @@ -48,7 +48,11 @@
  41. /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
  42. #define _GNU_SOURCE
  43. +#include <features.h>
  44. +/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
  45. +#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
  46. #define _FILE_OFFSET_BITS 64
  47. +#endif
  48. /* This is for ELF types etc, and also the AT_ constants. */
  49. #include <elf.h>
  50. /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */