Add definitions for PF_INET, PF_INET6 and PF_UNSPEC (#426)

Given there are already AF_* definitions, and they are (now) essentially
synonyms, we add those definitions to enable compilation of code that
already use PF_* macros.
This commit is contained in:
Marcin Kolny 2023-07-13 17:18:08 +01:00 committed by GitHub
parent ba5318e9a4
commit 9f51a71020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 9 deletions

View File

@ -33,10 +33,10 @@
#define ADJ_TAI 0x0080
#define ADJ_TICK 0x4000
#define ADJ_TIMECONST 0x0020
#define AF_INET 1
#define AF_INET6 2
#define AF_INET PF_INET
#define AF_INET6 PF_INET6
#define AF_UNIX 3
#define AF_UNSPEC 0
#define AF_UNSPEC PF_UNSPEC
#define ALT_DIGITS 0x2002F
#define AM_STR 0x20026
#define ANYMARK 0x01
@ -1315,6 +1315,9 @@
#define PAGE_SIZE PAGESIZE
#define PATH_MAX 4096
#define PDP_ENDIAN __PDP_ENDIAN
#define PF_INET 1
#define PF_INET6 2
#define PF_UNSPEC 0
#define PM_STR 0x20027
#define POLLERR 0x1000
#define POLLHUP 0x2000

View File

@ -33,10 +33,10 @@
#define ADJ_TAI 0x0080
#define ADJ_TICK 0x4000
#define ADJ_TIMECONST 0x0020
#define AF_INET 1
#define AF_INET6 2
#define AF_INET PF_INET
#define AF_INET6 PF_INET6
#define AF_UNIX 3
#define AF_UNSPEC 0
#define AF_UNSPEC PF_UNSPEC
#define ALT_DIGITS 0x2002F
#define AM_STR 0x20026
#define ANYMARK 0x01
@ -1315,6 +1315,9 @@
#define PAGE_SIZE PAGESIZE
#define PATH_MAX 4096
#define PDP_ENDIAN __PDP_ENDIAN
#define PF_INET 1
#define PF_INET6 2
#define PF_UNSPEC 0
#define PM_STR 0x20027
#define POLLERR 0x1000
#define POLLHUP 0x2000

View File

@ -25,9 +25,13 @@
#define SO_TYPE 3
#define AF_UNSPEC 0
#define AF_INET 1
#define AF_INET6 2
#define PF_UNSPEC 0
#define PF_INET 1
#define PF_INET6 2
#define AF_UNSPEC PF_UNSPEC
#define AF_INET PF_INET
#define AF_INET6 PF_INET6
#define AF_UNIX 3
#ifdef __cplusplus