mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 17:10:08 +01:00
shared: add nm_offsetofend() macro
This commit is contained in:
parent
9cf3cbfc3e
commit
61da320d62
1 changed files with 2 additions and 0 deletions
|
|
@ -36,6 +36,8 @@
|
|||
#define _nm_const __attribute__ ((const))
|
||||
#define _nm_printf(a,b) __attribute__ ((__format__ (__printf__, a, b)))
|
||||
|
||||
#define nm_offsetofend(t,m) (G_STRUCT_OFFSET (t,m) + sizeof (((t *) NULL)->m))
|
||||
|
||||
#define nm_auto(fcn) __attribute__ ((cleanup(fcn)))
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue