pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/41886?usp=email )
Change subject: csn1.h: Fix missing include stddef.h for offsetof() ......................................................................
csn1.h: Fix missing include stddef.h for offsetof()
Fixes following compiler error: """ In file included from /osmo-pcu/src/gsm_rlcmac.c:32: /osmo-pcu/src/csn1.h:310:32: error: implicit declaration of function 'offsetof' [-Wimplicit-function-declaration] 310 | {CSN_UINT, _BITS, {0}, offsetof(_STRUCT, _MEMBER), FALSE, #_MEMBER, 0, NULL} | ^~~~~~~~ /osmo-pcu/src/gsm_rlcmac.c:43:3: note: in expansion of macro 'M_UINT' 43 | M_UINT (PLMN_t, MCC2, 4), | ^~~~~~ /osmo-pcu/src/gsm_rlcmac.c:38:1: note: 'offsetof' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' 37 | #include <gprs_debug.h> +++ |+#include <stddef.h> """
Change-Id: I3ddd10dd67e7850ace36ac996598cbfd4bbaa40e --- M src/csn1.h 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve
diff --git a/src/csn1.h b/src/csn1.h index 6607b02..66e67ba 100644 --- a/src/csn1.h +++ b/src/csn1.h @@ -24,6 +24,8 @@ #ifndef _PACKET_CSN1_H_ #define _PACKET_CSN1_H_
+#include <stddef.h> + #include <osmocom/core/bitvec.h> #include "wireshark_compat.h"