Browse Source

macchanger: fix build with musl

According to netdevice(7) ifr_data is a "char *", not caddr_t.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Paul Fertser 9 years ago
parent
commit
4869be787a
2 changed files with 14 additions and 1 deletions
  1. 1
    1
      utils/macchanger/Makefile
  2. 13
    0
      utils/macchanger/patches/0001-fix-build-with-musl.patch

+ 1
- 1
utils/macchanger/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=macchanger
11 11
 PKG_VERSION:=1.7.0
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=https://github.com/alobbs/macchanger/releases/download/$(PKG_VERSION)/

+ 13
- 0
utils/macchanger/patches/0001-fix-build-with-musl.patch View File

@@ -0,0 +1,13 @@
1
+Index: macchanger-1.7.0/src/netinfo.c
2
+===================================================================
3
+--- macchanger-1.7.0.orig/src/netinfo.c
4
++++ macchanger-1.7.0/src/netinfo.c
5
+@@ -113,7 +113,7 @@ mc_net_info_get_permanent_mac (const net
6
+ 	epa->size = IFHWADDRLEN;
7
+ 
8
+ 	memcpy(&req, &(net->dev), sizeof(struct ifreq));
9
+-	req.ifr_data = (caddr_t)epa;
10
++	req.ifr_data = (char *)epa;
11
+ 
12
+ 	if (ioctl(net->sock, SIOCETHTOOL, &req) < 0) {
13
+ 		perror ("[ERROR] Could not read permanent MAC");