[vlc-devel] [PATCH 1/2] vlc_fixups: define if_nametoindex() on OS/2

KO Myung-Hun komh78 at gmail.com
Tue Dec 19 12:45:52 CET 2017


This fixes the following compilation breakge on OS/2.

-----
  CC       network/udp.lo
network/udp.c: In function 'net_SetMcastOut':
network/udp.c:259:17: error: implicit declaration of function 'if_nametoindex'; did you mean 'if_nameindex'? [-Werror=implicit-function-declaration]
     int scope = if_nametoindex (iface);
                 ^~~~~~~~~~~~~~
                 if_nameindex
-----
---
 include/vlc_fixups.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 6175a539bd..4ee94e5986 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -602,6 +602,8 @@ static const struct in6_addr in6addr_any =
 # ifndef EPROTO
 #  define EPROTO (ELAST + 1)
 # endif
+
+# define if_nametoindex(name)   atoi(name)
 #endif
 
 /* math.h */
-- 
2.13.3



More information about the vlc-devel mailing list