]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
sockets.c: Remove functions defined in libc
authorRazvan Deaconescu <razvand@unikraft.io>
Sun, 20 Nov 2022 13:08:09 +0000 (15:08 +0200)
committerUnikraft <monkey@unikraft.io>
Fri, 25 Nov 2022 09:47:28 +0000 (09:47 +0000)
Functions `if_nametoindex` and `if_indextoname` are to be defined by the
standard C library (Musl, nolibc).

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #23

sockets.c

index 5c3ffdc52727b876c26405d8246ff68a06c04bda..fda4a2f370b14e49708f0aee2e4f68d3fd863d43 100644 (file)
--- a/sockets.c
+++ b/sockets.c
@@ -41,6 +41,7 @@
 #include <vfscore/eventpoll.h>
 
 #include <lwip/sockets.h>
+#include <sys/socket.h>
 #include <lwip/priv/sockets_priv.h>
 #include <lwip/api.h>
 #include <lwip/sys.h>
@@ -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 <lwip/if_api.h>
-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);
-}