]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
build: Improve detection of dlopen(3) in libdl
authorRoy Marples <roy@marples.name>
Tue, 5 Nov 2019 16:23:02 +0000 (16:23 +0000)
committerRoy Marples <roy@marples.name>
Tue, 5 Nov 2019 16:23:02 +0000 (16:23 +0000)
configure

index 29ecaa76e5d192c796f40bb5ef96834fe860d586..9efa1638d5809416e552ef78d7086d2c0ad862d7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1506,7 +1506,10 @@ if [ "$DEV" = yes ]; then
 #include <dlfcn.h>
 #include <stdlib.h>
 int main(void) {
-       dlopen(NULL, 0);
+       void *h = dlopen("/foo/bar", 0);
+       void (*s)(char *) = dlsym(h, "deadbeef");
+       s(dlerror());
+       dlclose(h);
        return 0;
 }
 EOF