]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix e6fd79f379 build with --enable-tunables=no
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 21 Oct 2021 20:26:32 +0000 (17:26 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 21 Oct 2021 20:26:32 +0000 (17:26 -0300)
The _dl_sort_maps_init() is not defined when tunables is not enabled.

Checked on x86_64-linux-gnu.

sysdeps/generic/ldsodefs.h

index 65a6a516330b4dd7074a86285220ab1ada2d32e5..1318c36dcef5c2aee283ad0714e28148313ecaa5 100644 (file)
@@ -1245,7 +1245,16 @@ extern struct link_map * _dl_get_dl_main_map (void)
 #endif
 
 /* Initialize the DSO sort algorithm to use.  */
+#if !HAVE_TUNABLES
+static inline void
+__always_inline
+_dl_sort_maps_init (void)
+{
+  /* This is optimized out if tunables are not enabled.  */
+}
+#else
 extern void _dl_sort_maps_init (void) attribute_hidden;
+#endif
 
 /* Initialization of libpthread for statically linked applications.
    If libpthread is not linked in, this is an empty function.  */