mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
Make <struct.h> #error instead of #warn that it is going away on jan 1st.
This commit is contained in:
parent
8fd61eaf91
commit
82e078d8f9
1 changed files with 1 additions and 13 deletions
|
|
@ -39,19 +39,7 @@
|
|||
#define _STRUCT_H_
|
||||
|
||||
#if __GNUC__
|
||||
#warning "this file includes <struct.h> which is deprecated, use <stddef.h> instead"
|
||||
#error "this file includes <struct.h> which is deprecated, use <stddef.h> instead"
|
||||
#endif
|
||||
|
||||
/* Offset of the field in the structure. */
|
||||
#define fldoff(name, field) \
|
||||
((int)&(((struct name *)0)->field))
|
||||
|
||||
/* Size of the field in the structure. */
|
||||
#define fldsiz(name, field) \
|
||||
(sizeof(((struct name *)0)->field))
|
||||
|
||||
/* Address of the structure from a field. */
|
||||
#define strbase(name, addr, field) \
|
||||
((struct name *)((char *)(addr) - fldoff(name, field)))
|
||||
|
||||
#endif /* !_STRUCT_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue