pespin submitted this change.
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(-)
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"
To view, visit change 41886. To unsubscribe, or for help writing mail filters, visit settings.