summaryrefslogtreecommitdiff
path: root/package/macchanger/0001-Fix-missing-include-for-caddr_t.patch
blob: cf5ade8c2ce339ac3c5b5d7123c82b092e8f97ce (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
From 4eeb901b7aadb167e44f476fd665f7fedf491e51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
Date: Fri, 6 May 2016 09:28:36 +0200
Subject: [PATCH] Fix missing include for caddr_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

caddr_t is defined in <sys/types.h>. This header file must be included to fix
build with the musl C library:

netinfo.c: In function 'mc_net_info_get_permanent_mac':
netinfo.c:116:28: error: 'caddr_t' undeclared (first use in this function)
  req.ifr_data = (caddr_t)epa;

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 src/netinfo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/netinfo.c b/src/netinfo.c
index 3525123..1aa3293 100644
--- a/src/netinfo.c
+++ b/src/netinfo.c
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include <sys/types.h>
 
 #include <linux/ethtool.h>
 #include <linux/sockios.h>
-- 
2.8.2