do not compile some address families when not available
This fixes the following error while compiling libnl3 on CentOS5: addr.c:1027: error: 'AF_RDS' undeclared here (not in a function) addr.c:1033: error: 'AF_CAN' undeclared here (not in a function) addr.c:1034: error: 'AF_TIPC' undeclared here (not in a function) addr.c:1036: error: 'AF_IUCV' undeclared here (not in a function) addr.c:1037: error: 'AF_RXRPC' undeclared here (not in a function) addr.c:1038: error: 'AF_ISDN' undeclared here (not in a function) addr.c:1039: error: 'AF_PHONET' undeclared here (not in a function) make[2]: *** [addr.lo] Error 1 Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
18e593cd4e
commit
4f075a4fd1
1 changed files with 14 additions and 0 deletions
14
lib/addr.c
14
lib/addr.c
|
@ -1024,19 +1024,33 @@ static const struct trans_tbl afs[] = {
|
|||
__ADD(AF_ASH,ash)
|
||||
__ADD(AF_ECONET,econet)
|
||||
__ADD(AF_ATMSVC,atmsvc)
|
||||
#ifdef AF_RDS
|
||||
__ADD(AF_RDS,rds)
|
||||
#endif
|
||||
__ADD(AF_SNA,sna)
|
||||
__ADD(AF_IRDA,irda)
|
||||
__ADD(AF_PPPOX,pppox)
|
||||
__ADD(AF_WANPIPE,wanpipe)
|
||||
__ADD(AF_LLC,llc)
|
||||
#ifdef AF_CAN
|
||||
__ADD(AF_CAN,can)
|
||||
#endif
|
||||
#ifdef AF_TIPC
|
||||
__ADD(AF_TIPC,tipc)
|
||||
#endif
|
||||
__ADD(AF_BLUETOOTH,bluetooth)
|
||||
#ifdef AF_IUCV
|
||||
__ADD(AF_IUCV,iucv)
|
||||
#endif
|
||||
#ifdef AF_RXRPC
|
||||
__ADD(AF_RXRPC,rxrpc)
|
||||
#endif
|
||||
#ifdef AF_ISDN
|
||||
__ADD(AF_ISDN,isdn)
|
||||
#endif
|
||||
#ifdef AF_PHONET
|
||||
__ADD(AF_PHONET,phonet)
|
||||
#endif
|
||||
#ifdef AF_IEEE802154
|
||||
__ADD(AF_IEEE802154,ieee802154)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue