trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/protocols.c: fix build on old machines
@ 2016-02-02 12:25 Jiri Slaby
  2016-02-02 16:30 ` Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2016-02-02 12:25 UTC (permalink / raw)
  To: davej; +Cc: trinity, Jiri Slaby

* 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@suse.cz>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-02 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02 12:25 [PATCH] net/protocols.c: fix build on old machines Jiri Slaby
2016-02-02 16:30 ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).