add anoia.net.constants for SOCK_{STREAM,DGRAM} etc

we use an ugly bit of C preprocessor to get the values from
header files, because certain constants are different on MIPS
than on other architectures
This commit is contained in:
Daniel Barlow
2024-04-26 16:43:09 +01:00
parent 9795f03da4
commit 74cf3e0711
3 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
#define MACRO(c) [#c] = c,
return {
MACRO(SOCK_STREAM)
MACRO(SOCK_DGRAM)
MACRO(SOCK_RAW)
MACRO(AF_LOCAL)
MACRO(AF_NETLINK)
MACRO(NETLINK_KOBJECT_UEVENT)
}