]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Include <dl-auxv.h> in dl-sysdep.c only for SHARED
authorFlorian Weimer <fweimer@redhat.com>
Fri, 11 Feb 2022 18:03:04 +0000 (19:03 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 11 Feb 2022 18:50:58 +0000 (19:50 +0100)
Otherwise, <dl-auxv.h> on POWER ends up being included twice,
once in dl-sysdep.c, once in dl-support.c.  That leads to a linker
failure due to multiple definitions of _dl_cache_line_size.

Fixes commit d96d2995c1121d3310102afda2deb1f35761b5e6
("Revert "Linux: Consolidate auxiliary vector parsing").

sysdeps/unix/sysv/linux/dl-sysdep.c

index 5e71704fcff6555a6e3213d9c1573c8144a0c6e5..8ad72c4b7b768c7e634c3499137935607aa800a6 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <_itoa.h>
 #include <assert.h>
-#include <dl-auxv.h>
 #include <dl-hwcap-check.h>
 #include <dl-osinfo.h>
 #include <dl-procinfo.h>
@@ -46,6 +45,8 @@
 #include <dl-machine.h>
 
 #ifdef SHARED
+# include <dl-auxv.h>
+
 extern char **_environ attribute_hidden;
 extern char _end[] attribute_hidden;