1
0

200-fix-RTLD_NEXT.patch 784 B

123456789101112131415161718192021222324252627282930313233343536
  1. --- a/lib/address.c
  2. +++ b/lib/address.c
  3. @@ -48,11 +48,12 @@
  4. #include "upnp.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.288.4.4 2014/08/15 18:16:40 karls Exp $";
  15. --- a/dlib/interposition.c
  16. +++ b/dlib/interposition.c
  17. @@ -93,11 +93,12 @@ write$NOCANCEL(HAVE_PROT_WRITE_1, HAVE_P
  18. #endif /* HAVE_DARWIN */
  19. -#ifndef __USE_GNU
  20. -#define __USE_GNU /* XXX for RTLD_NEXT on Linux */
  21. -#endif /* !__USE_GNU */
  22. #include <dlfcn.h>
  23. +#ifndef RTLD_NEXT
  24. +#define RTLD_NEXT ((void *) -1l)
  25. +#endif
  26. +
  27. #ifdef __COVERITY__
  28. /*
  29. * Coverity naturally has no idea what the function sys_foo calls does,