Skip to content
Success

Changes

Summary

  1. csn1.h: Fix missing include stddef.h for offsetof() (details)
Commit e96eb3a57af8dfc8579a1a720a8652af7d489763 by Pau Espin Pedrol
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
The file was modifiedsrc/csn1.h