Browse Source

ldso: include dlfcn.h for RTLD_NODELETE

Building with NPTL enabled and shared library support disabled we hit:
In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0:
./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info':
./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function)
./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1

A previous commit (f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched
on a similar issue, but added the include to the incorrect location.

Reported-by: Christophe Lyon <christophe.lyon@st.com> [arm nommu]
Reported-by: Daniel Beecham <daniel@lunix.se> [static x86_64]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 11 years ago
parent
commit
b4725d8e2c
2 changed files with 1 additions and 1 deletions
  1. 1 0
      ldso/include/dl-elf.h
  2. 0 1
      ldso/include/ldso.h

+ 1 - 0
ldso/include/dl-elf.h

@@ -14,6 +14,7 @@
 #include <elf.h>
 #include <link.h>
 #include <dl-defs.h>
+#include <dlfcn.h>
 
 /* Forward declarations for stuff defined in dl-hash.h */
 struct dyn_elf;

+ 0 - 1
ldso/include/ldso.h

@@ -42,7 +42,6 @@
 #ifndef __ARCH_HAS_NO_SHARED__
 #include <dl-syscall.h>
 #include <dl-string.h>
-#include <dlfcn.h>
 /* Now the ldso specific headers */
 #include <dl-elf.h>
 #ifdef __UCLIBC_HAS_TLS__