summaryrefslogtreecommitdiff
blob: eb298fd99d806188704283b4c7abbd6c10a1c9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- a/configure.orig	2017-11-18 14:25:52.095495407 -0700
+++ b/configure	2018-07-21 11:44:59.235072132 -0600
@@ -317,6 +317,7 @@ check_header linux/auto_fs4.h USE_AUTOFS
 check_header linux/caif/caif_socket.h USE_CAIF
 check_header linux/fsmap.h USE_FSMAP
 check_header linux/if_alg.h USE_IF_ALG
+check_header linux/irda.h USE_IRDA
 check_header linux/rds.h USE_RDS
 check_header linux/vfio.h USE_VFIO
 check_header drm/drm.h USE_DRM
--- a/net/protocols.c.orig	2017-11-03 09:14:07.000000000 -0600
+++ b/net/protocols.c	2018-07-21 11:48:09.065940013 -0600
@@ -26,7 +26,9 @@ const struct protoptr net_protocols[TRIN
 #ifdef USE_RDS
 	[PF_RDS] = { .proto = &proto_rds },
 #endif
+#ifdef USE_IRDA
 	[PF_IRDA] = { .proto = &proto_irda },
+#endif
 	[PF_LLC] = { .proto = &proto_llc },
 	[PF_CAN] = { .proto = &proto_can },
 	[PF_TIPC] = { .proto = &proto_tipc },
--- a/net/proto-irda.c.orig	2017-11-03 09:14:07.000000000 -0600
+++ b/net/proto-irda.c	2018-07-21 11:45:34.330047712 -0600
@@ -4,13 +4,15 @@
 #include <sys/un.h>
 /* old irda.h does not include something which defines sa_family_t */
 #include <netinet/in.h>
-#include <linux/irda.h>
 #include <stdlib.h>
 #include "net.h"
 #include "random.h"
 #include "utils.h"	// RAND_ARRAY
 #include "compat.h"
 
+#ifdef USE_IRDA
+#include <linux/irda.h>
+
 static void irda_gen_sockaddr(struct sockaddr **addr, socklen_t *addrlen)
 {
 	struct sockaddr_irda *irda;
@@ -53,3 +55,5 @@ const struct netproto proto_irda = {
 	.valid_triplets = irda_triplets,
 	.nr_triplets = ARRAY_SIZE(irda_triplets),
 };
+
+#endif