diff mbox

Define missing __inet6_scopeid_pton internal function used by getaddrinfo

Message ID 128f21d2-6e76-feb8-5e85-a13feba1b51e@redhat.com
State New
Headers show

Commit Message

Florian Weimer Aug. 3, 2017, 10:28 a.m. UTC
On 08/03/2017 10:54 AM, Samuel Thibault wrote:
> Samuel Thibault, on jeu. 03 août 2017 02:36:26 +0200, wrote:
>> Samuel Thibault, on jeu. 03 août 2017 02:23:52 +0200, wrote:
>>> * posix/tst-rfc3484.c: Include <netinet/in.h> and <net/if.h>
>>> (__inet6_scopeid_pton): New function.
>>
>> And likewise for tst-rfc3484-2 and tst-rfc3484-3.
> 
> Err inet/tst-inet6_scopeid_pton.c also needs it, but how is this
> supposed to link when __inet6_scopeid_pton is marked attribute_hidden?

The attached patch should fix this.

Thanks,
Florian

Comments

Florian Weimer Aug. 10, 2017, 1:28 p.m. UTC | #1
On 08/03/2017 12:28 PM, Florian Weimer wrote:
> __inet6_scopeid_pton: Remove attribute_hidden, internal_function
> 
> The hidden attribute was overridden by libc_hidden_proto on GNU/Linux.
> It is incorrect because the function is used from nscd.
> 
> internal_function is not supposed to be used across DSO boundaries,
> so this commit removes it (again, due to the use in nscd).
> 
> 2017-08-03  Florian Weimer  <fweimer@redhat.com>
> 
> 	* inet/net-internal.h (__inet6_scopeid_pton): Remove
> 	attribute_hidden, internal_function.
> 	* inet/inet6_scopeid_pton.c (__inet6_scopeid_pton): Remove
> 	internal_function.

Any comments/  Otherwise I'm going to commit this shortly.

Thanks,
Florian
Samuel Thibault Aug. 10, 2017, 1:30 p.m. UTC | #2
Florian Weimer, on jeu. 10 août 2017 15:28:05 +0200, wrote:
> On 08/03/2017 12:28 PM, Florian Weimer wrote:
> > __inet6_scopeid_pton: Remove attribute_hidden, internal_function
> > 
> > The hidden attribute was overridden by libc_hidden_proto on GNU/Linux.
> > It is incorrect because the function is used from nscd.
> > 
> > internal_function is not supposed to be used across DSO boundaries,
> > so this commit removes it (again, due to the use in nscd).
> > 
> > 2017-08-03  Florian Weimer  <fweimer@redhat.com>
> > 
> > 	* inet/net-internal.h (__inet6_scopeid_pton): Remove
> > 	attribute_hidden, internal_function.
> > 	* inet/inet6_scopeid_pton.c (__inet6_scopeid_pton): Remove
> > 	internal_function.
> 
> Any comments/  Otherwise I'm going to commit this shortly.

It's fine to me, and a simpler fix than mine :)

Samuel
diff mbox

Patch

__inet6_scopeid_pton: Remove attribute_hidden, internal_function

The hidden attribute was overridden by libc_hidden_proto on GNU/Linux.
It is incorrect because the function is used from nscd.

internal_function is not supposed to be used across DSO boundaries,
so this commit removes it (again, due to the use in nscd).

2017-08-03  Florian Weimer  <fweimer@redhat.com>

	* inet/net-internal.h (__inet6_scopeid_pton): Remove
	attribute_hidden, internal_function.
	* inet/inet6_scopeid_pton.c (__inet6_scopeid_pton): Remove
	internal_function.

diff --git a/inet/inet6_scopeid_pton.c b/inet/inet6_scopeid_pton.c
index e09b1cb..cc8803f 100644
--- a/inet/inet6_scopeid_pton.c
+++ b/inet/inet6_scopeid_pton.c
@@ -28,7 +28,7 @@ 
 
 /* Parse SOURCE as a scope ID for ADDRESS.  Return 0 on success and -1
    on error.  */
-internal_function int
+int
 __inet6_scopeid_pton (const struct in6_addr *address, const char *scope,
                       uint32_t *result)
 {
diff --git a/inet/net-internal.h b/inet/net-internal.h
index 2b2632c..b213589 100644
--- a/inet/net-internal.h
+++ b/inet/net-internal.h
@@ -25,8 +25,7 @@ 
 #include <sys/time.h>
 
 int __inet6_scopeid_pton (const struct in6_addr *address,
-                          const char *scope, uint32_t *result)
-  internal_function attribute_hidden;
+                          const char *scope, uint32_t *result);
 libc_hidden_proto (__inet6_scopeid_pton)