From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id C59BE386EC62; Wed, 3 Feb 2021 20:01:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C59BE386EC62 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] posix/tst-rfc3484: Fix compile failure linking to local __stat64 X-Act-Checkin: glibc X-Git-Author: Stafford Horne X-Git-Refname: refs/heads/master X-Git-Oldrev: d46c51e9f9d54f1ae097df17391c91aa4408c532 X-Git-Newrev: a4efbf44757477717a907078c340386146c7623f Message-Id: <20210203200159.C59BE386EC62@sourceware.org> Date: Wed, 3 Feb 2021 20:01:59 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2021 20:01:59 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a4efbf44757477717a907078c340386146c7623f commit a4efbf44757477717a907078c340386146c7623f Author: Stafford Horne Date: Wed Feb 3 15:36:47 2021 -0300 posix/tst-rfc3484: Fix compile failure linking to local __stat64 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 Diff: --- posix/tst-rfc3484-2.c | 1 + posix/tst-rfc3484-3.c | 1 + posix/tst-rfc3484.c | 1 + 3 files changed, 3 insertions(+) diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c index 5f5ada9420..ce8ccd5f38 100644 --- a/posix/tst-rfc3484-2.c +++ b/posix/tst-rfc3484-2.c @@ -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 diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c index d9ec5cc851..ecb163963f 100644 --- a/posix/tst-rfc3484-3.c +++ b/posix/tst-rfc3484-3.c @@ -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 diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c index 97d065b6bf..3b2052eb54 100644 --- a/posix/tst-rfc3484.c +++ b/posix/tst-rfc3484.c @@ -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