cosmetic: use enum ranap_nsap_addr_enc instead of int
The only reason to use int instead of the enum was the lack of header
iu_client.h when not building with Iu support. Rather use the configure result
properly, include the header when Iu support is built and use the proper enum.
Omit the entire iu sub-struct when building without Iu.
Add LIBOSMORANAP_CFLAGS to libvlr, in order to find the iu_client.h header (now
also included from gsm_data.h).
Rationale: Instead of using a questionable typecast from int* to enum*, we can
now use the enum member directly without needing to silence compiler warnings.
Change-Id: Ic9f8bf53f4b605c166e84cd7edd90c10fe7d7a1f
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index c5e7aaf..73047ee 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -23,6 +23,11 @@
/* TS 48.008 DLCI containing DCCH/ACCH + SAPI */
#define OMSC_LINKID_CB(__msgb) (__msgb)->cb[3]
+#include "../../bscconfig.h"
+#if BUILD_IU
+#include <osmocom/ranap/iu_client.h>
+#endif
+
/** annotations for msgb ownership */
#define __uses
@@ -311,12 +316,14 @@
struct mgcp_client *client;
} mgw;
+#if BUILD_IU
struct {
/* CS7 instance id number (set via VTY) */
uint32_t cs7_instance;
- int rab_assign_addr_enc;
+ enum ranap_nsap_addr_enc rab_assign_addr_enc;
struct osmo_sccp_instance *sccp;
} iu;
+#endif
struct {
/* CS7 instance id number (set via VTY) */