summaryrefslogtreecommitdiff
path: root/lib/addr.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2013-04-05 10:37:55 +0200
committerThomas Graf <tgraf@suug.ch>2013-04-05 10:37:55 +0200
commitd3cf89ea9459ddfc1b35ef0a927ec8c969e07a5e (patch)
tree05dca2f5cb00eff2ac546f851c2c0197e7f7ad90 /lib/addr.c
parentea436445ad774179d6b3196e102907272f403da8 (diff)
downloadlibnl-d3cf89ea9459ddfc1b35ef0a927ec8c969e07a5e.tar.gz
addr: only translate more recent address family names and ARP types if defined
Helps making libnl compilable with older kernel headers Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'lib/addr.c')
-rw-r--r--lib/addr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/addr.c b/lib/addr.c
index 557b0ada..86e7e58e 100644
--- a/lib/addr.c
+++ b/lib/addr.c
@@ -1037,10 +1037,18 @@ static const struct trans_tbl afs[] = {
__ADD(AF_RXRPC,rxrpc)
__ADD(AF_ISDN,isdn)
__ADD(AF_PHONET,phonet)
+#ifdef AF_IEEE802154
__ADD(AF_IEEE802154,ieee802154)
+#endif
+#ifdef AF_CAIF
__ADD(AF_CAIF,caif)
+#endif
+#ifdef AF_ALG
__ADD(AF_ALG,alg)
+#endif
+#ifdef AF_NFC
__ADD(AF_NFC,nfc)
+#endif
};
char *nl_af2str(int family, char *buf, size_t size)