fix: define _DEFAULT_SOURCE and _BSD_SOURCE for BSD types
On newer glibc versions, BSD types like u_char are only available when _DEFAULT_SOURCE or _BSD_SOURCE feature test macros are defined. Define these macros before including any headers to ensure BSD types are available for net-snmp headers.
This commit is contained in:
parent
bcba9e67a0
commit
522223c57c
1 changed files with 4 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
// Pure C NIF for net-snmp MIB resolution
|
||||
// Directly links to libnetsnmp without Rust layer
|
||||
|
||||
// Enable BSD types (u_char, u_short, etc.) on newer glibc
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
|
||||
#include <erl_nif.h>
|
||||
#include <sys/types.h>
|
||||
#include <net-snmp/net-snmp-config.h>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue