macchanger: fix build with musl 1446/head
authorPaul Fertser <fercerpav@gmail.com>
Sun, 21 Jun 2015 12:06:32 +0000 (15:06 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 21 Jun 2015 12:06:32 +0000 (15:06 +0300)
According to netdevice(7) ifr_data is a "char *", not caddr_t.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
utils/macchanger/Makefile
utils/macchanger/patches/0001-fix-build-with-musl.patch [new file with mode: 0644]

index 667f1d1cbafb4a2aeadb3421de0d7439b7d26469..2bfcbbf2d94212f8882504861c93922b59fcc434 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=macchanger
 PKG_VERSION:=1.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/alobbs/macchanger/releases/download/$(PKG_VERSION)/
diff --git a/utils/macchanger/patches/0001-fix-build-with-musl.patch b/utils/macchanger/patches/0001-fix-build-with-musl.patch
new file mode 100644 (file)
index 0000000..4a30d55
--- /dev/null
@@ -0,0 +1,13 @@
+Index: macchanger-1.7.0/src/netinfo.c
+===================================================================
+--- macchanger-1.7.0.orig/src/netinfo.c
++++ macchanger-1.7.0/src/netinfo.c
+@@ -113,7 +113,7 @@ mc_net_info_get_permanent_mac (const net
+       epa->size = IFHWADDRLEN;
+       memcpy(&req, &(net->dev), sizeof(struct ifreq));
+-      req.ifr_data = (caddr_t)epa;
++      req.ifr_data = (char *)epa;
+       if (ioctl(net->sock, SIOCETHTOOL, &req) < 0) {
+               perror ("[ERROR] Could not read permanent MAC");