200-fix-RTLD_NEXT.patch 790 B

123456789101112131415161718192021222324252627282930313233343536
  1. --- a/lib/address.c
  2. +++ b/lib/address.c
  3. @@ -45,11 +45,12 @@
  4. #include "interposition.h"
  5. -#ifndef __USE_GNU
  6. -#define __USE_GNU /* XXX for RTLD_NEXT on Linux */
  7. -#endif /* !__USE_GNU */
  8. #include <dlfcn.h>
  9. +#ifndef RTLD_NEXT
  10. +#define RTLD_NEXT ((void *) -1l)
  11. +#endif
  12. +
  13. static const char rcsid[] =
  14. "$Id: address.c,v 1.177.2.2 2010/05/24 16:38:36 karls Exp $";
  15. --- a/dlib/interposition.c
  16. +++ b/dlib/interposition.c
  17. @@ -66,11 +66,12 @@ sendto(HAVE_PROT_SENDTO_1, HAVE_PROT_SEN
  18. HAVE_PROT_SENDTO_4, HAVE_PROT_SENDTO_5, HAVE_PROT_SENDTO_6);
  19. #endif
  20. -#ifndef __USE_GNU
  21. -#define __USE_GNU /* XXX for RTLD_NEXT on Linux */
  22. -#endif /* !__USE_GNU */
  23. #include <dlfcn.h>
  24. +#ifndef RTLD_NEXT
  25. +#define RTLD_NEXT ((void *) -1l)
  26. +#endif
  27. +
  28. #undef accept
  29. #undef bind
  30. #undef bindresvport