Explorar o código

create __if_nametoindex hidden alias and use it

Mike Frysinger %!s(int64=18) %!d(string=hai) anos
pai
achega
d2d573391d
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      libc/inet/getaddrinfo.c
  2. 1 0
      libc/inet/if_index.c

+ 1 - 0
libc/inet/getaddrinfo.c

@@ -51,6 +51,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define inet_pton __inet_pton
 #define inet_ntop __inet_ntop
 #define strtoul __strtoul
+#define if_nametoindex __if_nametoindex
 #if 0
 #define uname __uname
 #define stpcpy __stpcpy

+ 1 - 0
libc/inet/if_index.c

@@ -65,6 +65,7 @@ if_nametoindex(const char* ifname)
   return ifr.ifr_ifindex;
 #endif
 }
+hidden_strong_alias(if_nametoindex,__if_nametoindex)
 
 void
 if_freenameindex (struct if_nameindex *ifn)