]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Fix build when shared libraries are disabled
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Mar 2013 15:29:59 +0000 (08:29 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Mar 2013 15:29:59 +0000 (08:29 -0700)
On some platforms, shared libraries are not used. The stub code
need some updating to not generate errors.

genl/static-syms.c
include/dlfcn.h
ip/static-syms.c
tc/static-syms.c

index 1ed3a8a90bd787f687c5b8d95eaceedff42fce3e..0bc80743a776cee0dc39c59daa16be09dc9ee61f 100644 (file)
@@ -1,4 +1,12 @@
+/*
+ * This file creates a dummy version of dynamic loading
+ * for environments where dynamic linking
+ * is not used or available.
+ */
+
 #include <string.h>
+#include "dlfcn.h"
+
 void *_dlsym(const char *sym)
 {
 #include "static-syms.h"
index b0be5a0f49f11518178e38cd743a50a0496fe79f..c54f8d8e8de362e47ad380bdd9b58c039f28dca2 100644 (file)
@@ -8,6 +8,7 @@
 #else
 
 #define RTLD_LAZY 0
+#define RTLD_GLOBAL 1
 #define _FAKE_DLFCN_HDL (void *)0xbeefcafe
 
 static inline void *dlopen(const char *file, int flag)
index 1ed3a8a90bd787f687c5b8d95eaceedff42fce3e..0bc80743a776cee0dc39c59daa16be09dc9ee61f 100644 (file)
@@ -1,4 +1,12 @@
+/*
+ * This file creates a dummy version of dynamic loading
+ * for environments where dynamic linking
+ * is not used or available.
+ */
+
 #include <string.h>
+#include "dlfcn.h"
+
 void *_dlsym(const char *sym)
 {
 #include "static-syms.h"
index 1ed3a8a90bd787f687c5b8d95eaceedff42fce3e..0bc80743a776cee0dc39c59daa16be09dc9ee61f 100644 (file)
@@ -1,4 +1,12 @@
+/*
+ * This file creates a dummy version of dynamic loading
+ * for environments where dynamic linking
+ * is not used or available.
+ */
+
 #include <string.h>
+#include "dlfcn.h"
+
 void *_dlsym(const char *sym)
 {
 #include "static-syms.h"