From: Razvan Deaconescu Date: Sun, 20 Nov 2022 13:08:09 +0000 (+0200) Subject: sockets.c: Remove functions defined in libc X-Git-Tag: RELEASE-0.11.0~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d73fd1bb909da5c690cd8d3af3a42188c8a8c208;p=unikraft%2Flibs%2Flwip.git sockets.c: Remove functions defined in libc Functions `if_nametoindex` and `if_indextoname` are to be defined by the standard C library (Musl, nolibc). Signed-off-by: Razvan Deaconescu Reviewed-by: Cezar Craciunoiu Approved-by: Marco Schlumpp Tested-by: Unikraft CI GitHub-Closes: #23 --- diff --git a/sockets.c b/sockets.c index 5c3ffdc..fda4a2f 100644 --- a/sockets.c +++ b/sockets.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -619,14 +620,3 @@ POSIX_SOCKET_FAMILY_REGISTER(AF_INET, &lwip_posix_socket_ops); #ifdef CONFIG_LWIP_IPV6 POSIX_SOCKET_FAMILY_REGISTER(AF_INET6, &lwip_posix_socket_ops); #endif /* CONFIG_LWIP_IPV6 */ - -#include -unsigned int if_nametoindex(const char *ifname) -{ - return lwip_if_nametoindex(ifname); -} - -char *if_indextoname(unsigned int ifindex, char *ifname) -{ - return lwip_if_indextoname(ifindex, ifname); -}