Skip to contentSkip to conversation

compat.h: Add more address family symbols for older glibc.

PATCH New Vinson Lee 1 participant 1 message Aug 17, 2013

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 compat.h: Add more address family symbols for older glibc.

From: Vinson Lee <[email protected]>

This patch fixes these build errors with glibc before 2.10.

syscalls/socket.c:27: error: ‘AF_CAN’ undeclared here (not in a function) syscalls/socket.c:33: error: ‘AF_LLC’ undeclared here (not in a function) syscalls/socket.c:38: error: ‘AF_PHONET’ undeclared here (not in a function) syscalls/socket.c:39: error: ‘AF_RDS’ undeclared here (not in a function) syscalls/socket.c:40: error: ‘AF_TIPC’ undeclared here (not in a function)

---
 include/compat.h |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
include/compat.h +34 -0
index 7e73131..fe5d0c7 100644
@@ -93,6 +93,19 @@ enum {
 
 
 /* bits/socket.h */
+#ifndef PF_RDS
+#define PF_RDS		21
+#endif
+#ifndef AF_RDS
+#define AF_RDS		PF_RDS
+#endif
+
+#ifndef PF_LLC
+#define PF_LLC		26
+#endif
+#ifndef AF_LLC
+#define AF_LLC		PF_LLC
+#endif
 
 #ifndef AF_IB
 #define AF_IB		27
@@ -101,6 +114,27 @@ enum {
 #define PF_IB          AF_IB
 #endif
 
+#ifndef PF_CAN
+#define PF_CAN		29
+#endif
+#ifndef AF_CAN
+#define AF_CAN		PF_CAN
+#endif
+
+#ifndef PF_TIPC
+#define PF_TIPC		30
+#endif
+#ifndef AF_TIPC
+#define AF_TIPC		PF_TIPC
+#endif
+
+#ifndef PF_PHONET
+#define PF_PHONET	35
+#endif
+#ifndef AF_PHONET
+#define AF_PHONET	PF_PHONET
+#endif
+
 #ifndef PF_CAIF
 #define PF_CAIF		37
 #endif
Signature · 1 line
1.7.4.1