summaryrefslogtreecommitdiff
path: root/gst/festival
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@gmail.com>2008-07-04 16:06:09 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-07-04 16:06:09 +0000
commit1f25b18c45770894988fa8914e6cd905c4f81fa3 (patch)
treec4b79236648e0aaf1e2f898ee6fb2a6ab63a3097 /gst/festival
parent4e2dcf4015d952f8311a019f06fc85765089886b (diff)
Fix built of the festival plugin with mingw32 by linking to ws2_32.dll and including winsock headers. Fixes bug #541522.
Original commit message from CVS: Patch by: Damien Lespiau <damien dot lespiau at gmail dot com> * configure.ac: * gst/festival/Makefile.am: * gst/festival/gstfestival.c: Fix built of the festival plugin with mingw32 by linking to ws2_32.dll and including winsock headers. Fixes bug #541522.
Diffstat (limited to 'gst/festival')
-rw-r--r--gst/festival/Makefile.am9
-rw-r--r--gst/festival/gstfestival.c7
2 files changed, 15 insertions, 1 deletions
diff --git a/gst/festival/Makefile.am b/gst/festival/Makefile.am
index 459944201..8200d0652 100644
--- a/gst/festival/Makefile.am
+++ b/gst/festival/Makefile.am
@@ -1,11 +1,18 @@
plugin_LTLIBRARIES = libgstfestival.la
+if HAVE_WINSOCK2_H
+WINSOCK2_LIBS = -lws2_32
+else
+WINSOCK2_LIBS =
+endif
+
libgstfestival_la_SOURCES = gstfestival.c
libgstfestival_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
# we use net connection now... perhaps use the lib later
# libgstfestival_la_LIBADD = $(FESTIVAL_LIBS)
-libgstfestival_la_LIBADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-0.10
+libgstfestival_la_LIBADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) \
+ -lgstaudio-0.10 $(WINSOCK2_LIBS)
libgstfestival_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstfestival.h
diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c
index f6f0a7b0a..f2ce45a67 100644
--- a/gst/festival/gstfestival.c
+++ b/gst/festival/gstfestival.c
@@ -79,16 +79,23 @@
#include "config.h"
#endif
+#include <glib.h> /* Needed for G_OS_XXXX macros */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
+#ifdef G_OS_WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#endif
#include "gstfestival.h"
#include <gst/audio/audio.h>