[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* include compat.h for PF_* constants
* use PF_NFC only if it can fit into the list
* use PF_ALG only if USE_IF_ALG is defined

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
 net/protocols.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/protocols.c b/net/protocols.c
index b8ae822ea2cf..febe0fd44781 100644
--- a/net/protocols.c
+++ b/net/protocols.c
@@ -1,6 +1,7 @@
 #include <sys/socket.h>
 #include "config.h"
 #include "net.h"
+#include "compat.h"
 
 const struct protoptr net_protocols[PF_MAX] = {
 	[PF_UNIX] = { .proto = &proto_unix },
@@ -29,7 +30,9 @@ const struct protoptr net_protocols[PF_MAX] = {
 #ifdef USE_CAIF
 	[PF_CAIF] = { .proto = &proto_caif },
 #endif
+#if PF_NFC < PF_MAX
 	[PF_NFC] = { .proto = &proto_nfc },
+#endif
 #ifdef USE_NETROM
 	[PF_NETROM] = { .proto = &proto_netrom },
 #endif
@@ -43,5 +46,7 @@ const struct protoptr net_protocols[PF_MAX] = {
 	[PF_PPPOX] = { .proto = &proto_pppol2tp },
 	[PF_IUCV] = { .proto = &proto_iucv },
 	[PF_RXRPC] = { .proto = &proto_rxrpc },
+#ifdef USE_IF_ALG
 	[PF_ALG] = { .proto = &proto_alg },
+#endif
 };
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux