I didn't realize that some of the includes from osmo-ggsn were public API.
In a WIP branch I've added in46_addr.c and in46_addr.h to libgtp, which fixes the above error. However building osmo-sgsn now gives new errors:
../../../../src/osmo-sgsn/src/sgsn/sgsn_cdr.c: In function ‘cdr_snprintf_pdp’:
../../../../src/osmo-sgsn/src/sgsn/sgsn_cdr.c:177:57: error: ‘struct in46_addr’ has no member named ‘s_addr’
177 | inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, sizeof(sgsn_addr));
| ^
make[4]: *** [Makefile:572: sgsn_cdr.o] Error 1
make[4]: *** Waiting for unfinished jobs....
../../../../src/osmo-sgsn/src/sgsn/sgsn_vty.c: In function ‘show_sgsn’:
../../../../src/osmo-sgsn/src/sgsn/sgsn_vty.c:674:44: error: incompatible type for argument 1 of ‘inet_ntoa’
674 | inet_ntoa(sgsn->gsn->gsnc), inet_ntoa(sgsn->gsn->gsnu), VTY_NEWLINE);
| ~~~~~~~~~^~~~~~
| |
| struct in46_addr
In file included from ../../../../src/osmo-sgsn/src/sgsn/sgsn_vty.c:24:
/usr/include/arpa/inet.h:53:40: note: expected ‘struct in_addr’ but argument is of type ‘struct in46_addr’
53 | extern char *inet_ntoa (struct in_addr __in) __THROW;
| ~~~~~~~~~~~~~~~^~~~
../../../../src/osmo-sgsn/src/sgsn/sgsn_vty.c:674:72: error: incompatible type for argument 1 of ‘inet_ntoa’
674 | inet_ntoa(sgsn->gsn->gsnc), inet_ntoa(sgsn->gsn->gsnu), VTY_NEWLINE);
| ~~~~~~~~~^~~~~~
| |
| struct in46_addr
In file included from ../../../../src/osmo-sgsn/src/sgsn/sgsn_vty.c:24:
/usr/include/arpa/inet.h:53:40: note: expected ‘struct in_addr’ but argument is of type ‘struct in46_addr’
53 | extern char *inet_ntoa (struct in_addr __in) __THROW;
| ~~~~~~~~~~~~~~~^~~~
make[4]: *** [Makefile:572: sgsn_vty.o] Error 1
../../../../src/osmo-sgsn/src/sgsn/gprs_ranap.c: In function ‘gsm0408_gprs_rcvmsg_iu’:
../../../../src/osmo-sgsn/src/sgsn/gprs_ranap.c:254:9: note: ‘#pragma message: set drop_cipherable arg for gsm0408_rcv_gmm() from IuPS?’
254 | #pragma message "set drop_cipherable arg for gsm0408_rcv_gmm() from IuPS?"
| ^~~~~~~
../../../../src/osmo-sgsn/src/sgsn/sgsn_libgtp.c: In function ‘sgsn_gtp_init’:
../../../../src/osmo-sgsn/src/sgsn/sgsn_libgtp.c:913:22: error: passing argument 3 of ‘gtp_new’ from incompatible pointer type [-Werror=incompatible-pointer-types]
913 | &sgi->cfg.gtp_listenaddr.sin_addr, GTP_MODE_SGSN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct in_addr *
In file included from /usr/local/include/osmocom/gtp/gtp.h:19,
from /usr/local/include/gtp.h:2,
from ../../../../src/osmo-sgsn/include/osmocom/sgsn/sgsn.h:24,
from ../../../../src/osmo-sgsn/src/sgsn/sgsn_libgtp.c:47:
/usr/local/include/osmocom/gtp/gsn.h:121:74: note: expected ‘struct in46_addr *’ but argument is of type ‘struct in_addr *’
121 | extern int gtp_new(struct gsn_t **gsn, char *statedir, struct in46_addr *listen, int mode);
| ~~~~~~~~~~~~~~~~~~^~~~~~
cc1: all warnings being treated as errors
I'll revert the patches that caused this for now, and will re-implement them in a backwards compatible way.