Add include for dlopen flags, fix build on musl

RTLD_DEEPBIND is not defined on musl based systems, add a check
before using it.
pull/139/head
Danilo Spinella 4 years ago committed by jackun
parent fb64b2ae0e
commit b6340c832a

@ -4,6 +4,7 @@
* For conditions of distribution and use, see copyright notice in elfhacks.h
*/
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include "real_dlsym.h"
@ -57,7 +58,9 @@ void *real_dlopen(const char *filename, int flag)
FLAG(RTLD_LOCAL)
FLAG(RTLD_NODELETE)
FLAG(RTLD_NOLOAD)
#ifdef RTLD_DEEPBIND
FLAG(RTLD_DEEPBIND)
#endif
#undef FLAG
printf(") = %p\n", result);
}

Loading…
Cancel
Save