mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
netlink.h: s/typeof/__typeof
typeof() does not exist in -std=c99 mode and the relevant #define is only for _KERNEL, so use __typeof here instead. Reviewed by: jhb MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1070 (cherry picked from commit 4261507a5e3e73ef6f9535935d22785056954b19)
This commit is contained in:
parent
551f4b478b
commit
4fa4e6a3c8
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ enum nlmsginfo_attrs {
|
|||
|
||||
#define NL_ITEM_OK(_ptr, _len, _hlen, _LEN_M) \
|
||||
((_len) >= _hlen && _LEN_M(_ptr) >= _hlen && _LEN_M(_ptr) <= (_len))
|
||||
#define NL_ITEM_NEXT(_ptr, _LEN_M) ((typeof(_ptr))((char *)(_ptr) + _LEN_M(_ptr)))
|
||||
#define NL_ITEM_NEXT(_ptr, _LEN_M) ((__typeof(_ptr))((char *)(_ptr) + _LEN_M(_ptr)))
|
||||
#define NL_ITEM_ITER(_ptr, _len, _LEN_MACRO) \
|
||||
((_len) -= _LEN_MACRO(_ptr), NL_ITEM_NEXT(_ptr, _LEN_MACRO))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue