laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
libosmovty: Link libosmovty against libpthread

Ever since Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a in 2020
(part of libosmocore >= 1.4.0) we have introduced cpu_sched_vty.c, which
directly uses libpthread. As a result, libosmovty should be using
pthread compiler flags and link against libpthread.

This missing dependency is causing osmocom applications to
fail to link on OpenWRT (at leats for ath79-generic).

Change-Id: I7febbf88cbe61eacd05f46a9316e773b5c148e77
Related: SYS#4986
---
M src/vty/Makefile.am
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index c73dbb2..37faad6 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -4,7 +4,7 @@
LIBVERSION=10:0:1

AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -Wall $(TALLOC_CFLAGS)
+AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS)

if ENABLE_VTY
lib_LTLIBRARIES = libosmovty.la
@@ -14,5 +14,5 @@
fsm_vty.c talloc_ctx_vty.c \
cpu_sched_vty.c tdef_vty.c
libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
-libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS)
+libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) $(PTHREAD_LIBS)
endif

To view, visit change 27580. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7febbf88cbe61eacd05f46a9316e773b5c148e77
Gerrit-Change-Number: 27580
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged