laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
gtphub: add LIBCARES_CFLAGS to AM_CFLAGS

gtphub_ares.c and gtphub_vty.c reach <ares.h> through
osmocom/sgsn/sgsn.h, and src/gtphub/Makefile.am already has
$(LIBCARES_LIBS) on the link line, but AM_CFLAGS never got
$(LIBCARES_CFLAGS). The compile therefore only works where c-ares
headers sit in a default include directory.

With c-ares from Homebrew on macOS ARM64 the header is in
/opt/homebrew/include and the build stops:

fatal error: 'ares.h' file not found

Every other directory in the tree that uses c-ares already passes the
flag: src/gprs, src/sgsn, and the tests under tests/sgsn,
tests/gprs_routing_area, tests/slhc, tests/sndcp_xid, tests/v42bis and
tests/xid. src/gtphub is the only one missing it.

No change where the header was already found.

Change-Id: Ibe4ddc357fb3ccf285e9a9f91217fc130bc3973c
Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com>
---
M src/gtphub/Makefile.am
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/gtphub/Makefile.am b/src/gtphub/Makefile.am
index a242a05..6ea5ab2 100644
--- a/src/gtphub/Makefile.am
+++ b/src/gtphub/Makefile.am
@@ -12,6 +12,7 @@
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOGSUPCLIENT_CFLAGS) \
$(COVERAGE_CFLAGS) \
+ $(LIBCARES_CFLAGS) \
$(LIBGTP_CFLAGS) \
$(NULL)
if BUILD_IU

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

Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibe4ddc357fb3ccf285e9a9f91217fc130bc3973c
Gerrit-Change-Number: 43586
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman@gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>