1From 549773fdaf1fb003b84f25df386a07d299cdeb3e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 18 Jul 2017 21:25:33 -0700
4Subject: [PATCH] zeroconf: Rename arp_op to avoid namespace conflicts with C
5 library
6
7on musl e.g. we get
8In file included from /mnt/a/oe/build/tmp/work/corei7-64-bec-linux-musl/zeroconf/0.9-r1/recipe-sysroot/usr/include/net/ethernet.h:10:0,
9
10This is because in musl arp_op is a define which is included
11and causes the conflict
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15Upstream-Status: Pending
16
17 zeroconf.c | 10 +++++-----
18 1 file changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/zeroconf.c b/zeroconf.c
21index 812d34b..f27e907 100644
22--- a/zeroconf.c
23+++ b/zeroconf.c
24@@ -14,8 +14,6 @@
25
26 #include <sys/types.h>
27 #include <sys/socket.h>
28-#include <linux/rtnetlink.h>
29-#include <linux/if.h>
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <string.h>
33@@ -34,6 +32,8 @@
34 #include <sys/time.h>
35 #include <signal.h>
36 #include <limits.h>
37+#include <linux/rtnetlink.h>
38+#include <linux/if.h>
39
40 #include "delay.h"
41
42@@ -108,7 +108,7 @@ int  arp_conflict(struct intf *intf, struct arp_packet *pkt);
43 void arp_packet_dump(struct arp_packet *pkt);
44 void arp_packet_send(int as,
45 		     struct intf *intf,
46-		     short int arp_op,
47+		     short int arpop,
48 		     int null_sender);
49 void arp_probe(int as, struct intf *intf);
50 void arp_claim(int as, struct intf *intf);
51@@ -1591,7 +1591,7 @@ int  arp_conflict(struct intf *intf, struct arp_packet *pkt)
52
53 void arp_packet_send(int as,
54 		     struct intf *intf,
55-		     short int arp_op,
56+		     short int arpop,
57 		     int null_sender)
58 {
59
60@@ -1605,7 +1605,7 @@ void arp_packet_send(int as,
61   ap.arp.ar_pro = htons(ARP_IP_PROTO);
62   ap.arp.ar_hln = ETH_ALEN;
63   ap.arp.ar_pln = 4; /* octets in IPv4 address */
64-  ap.arp.ar_op = htons(arp_op);
65+  ap.arp.ar_op = htons(arpop);
66
67   /* filling with 0xff sets the destination to
68    * the broadcast link-layer address for free
69--
702.13.3
71
72