[Bug 754875] configure.ac: no socketpair() check causes unresolved reference

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 11 08:00:31 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=754875

--- Comment #6 from Igor Rondarev <d_garry at mail.ru> ---
I'm not familiar with Git, so take a look, is everything OK?

>From 2da4cba2204cd0790565efaeeab9b0f87d167ead Mon Sep 17 00:00:00 2001
From: Igor Rondarev <igor.rondarev at gmail.com>
Date: Fri, 11 Sep 2015 17:58:48 +0300
Subject: [PATCH] fixed missing dependency for socketpair() function; some
 systems (e.g. QNX) have this fuction in libsocket library, not in libc.

---
 configure.ac    | 8 ++++++++
 gst/Makefile.am | 1 +
 2 files changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index bd18632..2792744 100644
--- a/configure.ac
+++ b/configure.ac
@@ -620,6 +620,14 @@ AC_CHECK_FUNCS([poll])
 AC_CHECK_FUNCS([ppoll])
 AC_CHECK_FUNCS([pselect])

+dnl check for socketpair()
+AC_CHECK_FUNC(socketpair, [], [
+  AC_CHECK_LIB(socket, socketpair, [
+    SOCKET_LIBS="-lsocket"
+    AC_SUBST(SOCKET_LIBS)
+  ]) 
+])
+
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***
 dnl ****************************************
diff --git a/gst/Makefile.am b/gst/Makefile.am
index a117d97..213e3fd 100644
--- a/gst/Makefile.am
+++ b/gst/Makefile.am
@@ -151,6 +151,7 @@ libgstreamer_ at GST_API_VERSION@_la_LIBADD =          \
        $(GST_PRINTF_LA)                                \
        $(GST_ALL_LIBS)                                 \
        $(WIN32_LIBS)                                   \
+       $(SOCKET_LIBS)                                  \
        $(LIBM)

 libgstreamer_ at GST_API_VERSION@_la_LDFLAGS =            \
-- 
2.1.4

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list