]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix/tst-rfc3484: Fix compile failure linking to local __stat64
authorStafford Horne <shorne@gmail.com>
Wed, 3 Feb 2021 18:36:47 +0000 (15:36 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 3 Feb 2021 19:12:13 +0000 (16:12 -0300)
After 04986243d1 ("Remove internal usage of extensible stat functions")
linking the __stat64 symbol in getaddrinfo for this test fails with the
below error:

    [...] or1k-smh-linux-gnu/bin/ld: [...]/posix/tst-rfc3484.o: in function `gaiconf_reload':
    [...]/sysdeps/posix/getaddrinfo.c:2136: undefined reference to `__stat64'
    collect2: error: ld returned 1 exit status

This is because __stat64 is a local symbol, the test includes the
getaddrinfo directly and fails to link against the local symbol.  Fix
this by setting up an alias to the global stat64 symbol name like is
done for other local symbol usage.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
posix/tst-rfc3484-2.c
posix/tst-rfc3484-3.c
posix/tst-rfc3484.c

index 5f5ada9420831d02c184200cddb3c30be70b96e0..ce8ccd5f38cfe07c1881a8b40f5ce4c20cebcde7 100644 (file)
@@ -11,6 +11,7 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 #define __qsort_r qsort_r
+#define __stat64 stat64
 
 void
 attribute_hidden
index d9ec5cc851492963e03c773c6dd3eefdc9dbf5e9..ecb163963fe904ec2c82c74a2ce0ecca352c2dc3 100644 (file)
@@ -11,6 +11,7 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 #define __qsort_r qsort_r
+#define __stat64 stat64
 
 void
 attribute_hidden
index 97d065b6bf939dfdf8f31f490233936d3768298d..3b2052eb54aeb2128a40bc3f01f6f12f1c8b3eb6 100644 (file)
@@ -11,6 +11,7 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 #define __qsort_r qsort_r
+#define __stat64 stat64
 
 void
 attribute_hidden