From 22b9f5b31f6e26a7ba31bcf54245e3bad1fb4885 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh@chollian.net>
Date: Sun, 12 Oct 2014 14:51:56 +0900
Subject: [PATCH] vlccore: export vlc_poll() and freeaddrinfo()

---
 src/Makefile.am |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 1e113c9..fafd56c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -181,20 +181,29 @@ libvlccore_la_SOURCES = $(SOURCES_libvlc)
 libvlccore_la_LDFLAGS = \
 	$(LDFLAGS_libvlccore) \
 	-no-undefined \
-	-export-symbols $(srcdir)/libvlccore.sym \
 	-version-info 8:0:0
 libvlccore_la_LIBADD = $(LIBS_libvlccore) \
 	../compat/libcompat.la \
 	$(LTLIBINTL) $(LTLIBICONV) \
 	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
+if !HAVE_OS2
+libvlccore_la_LDFLAGS += -export-symbols $(srcdir)/libvlccore.sym
 libvlccore_la_DEPENDENCIES = libvlccore.sym
+else
+libvlccore_la_LDFLAGS += -export-symbols $(srcdir)/libvlccore-os2.sym -avoid-version
+libvlccore_la_DEPENDENCIES = libvlccore-os2.sym
+
+CLEANFILES += libvlccore-os2.sym
+
+libvlccore-os2.sym: libvlccore.sym
+	cat libvlccore.sym > $@
+	echo vlc_poll >> $@
+	echo freeaddrinfo >> $@
+endif
 if HAVE_WIN32
 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version
 endif
-if HAVE_OS2
-libvlccore_la_LDFLAGS += -avoid-version
-endif
 if HAVE_DBUS
 libvlccore_la_LIBADD += $(DBUS_LIBS)
 endif
-- 
1.7.3.2

