[vlc-commits] configure: check and define if_nametoindex() on OS/2

KO Myung-Hun git at videolan.org
Mon Jan 8 11:56:36 CET 2018


vlc/vlc-3.0 | branch: master | KO Myung-Hun <komh78 at gmail.com> | Mon Jan  1 23:30:02 2018 +0900| [b69112b4767ff72b7033ef54144e91eb1b1f47e5] | committer: Hugo Beauzée-Luyssen

configure: check and define if_nametoindex() on OS/2

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
-----

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
(cherry picked from commit ebcbb4d84e9207662d2bfc4e7fdf668d95caffd3)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b69112b4767ff72b7033ef54144e91eb1b1f47e5
---

 configure.ac         | 1 +
 include/vlc_fixups.h | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index e27c08957f..5f32963f6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -290,6 +290,7 @@ case "${host_os}" in
     LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
     AC_LIBOBJ([freeaddrinfo])
     AC_LIBOBJ([gai_strerror])
+    AC_CHECK_FUNCS([if_nametoindex])
     ;;
   *nacl*)
     SYS=nacl
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 4888b782be..d6ad945f01 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -605,6 +605,10 @@ static const struct in6_addr in6addr_any =
 # ifndef EPROTO
 #  define EPROTO (ELAST + 1)
 # endif
+
+# ifndef HAVE_IF_NAMETOINDEX
+#  define if_nametoindex(name)  atoi(name)
+# endif
 #endif
 
 /* math.h */



More information about the vlc-commits mailing list