You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
879 B

  1. commit 62af9c83f9ed2b25e0061798e29e3cccfce5fbdc
  2. Author: Willy Tarreau <w@1wt.eu>
  3. Date: Tue Mar 10 07:51:48 2020 +0100
  4. BUILD: make dladdr1 depend on glibc version and not __USE_GNU
  5. Technically speaking the call was implemented in glibc 2.3 so we must
  6. rely on this and not on __USE_GNU which is an internal define of glibc
  7. to track use of GNU_SOURCE.
  8. diff --git a/src/standard.c b/src/standard.c
  9. index e0ea8328e..d16eebfea 100644
  10. --- a/src/standard.c
  11. +++ b/src/standard.c
  12. @@ -4350,7 +4350,7 @@ void debug_hexdump(FILE *out, const char *pfx, const char *buf,
  13. static int dladdr_and_size(const void *addr, Dl_info *dli, size_t *size)
  14. {
  15. int ret;
  16. -#ifdef __USE_GNU // most detailed one
  17. +#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) // most detailed one
  18. const ElfW(Sym) *sym;
  19. ret = dladdr1(addr, dli, (void **)&sym, RTLD_DL_SYMENT);