aboutsummaryrefslogtreecommitdiff
path: root/utils/macchanger
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2015-06-21 15:06:32 +0300
committerPaul Fertser <fercerpav@gmail.com>2015-06-21 15:06:32 +0300
commit4869be787a35ad787bd085c3484c356e5aae87b8 (patch)
tree702dbdf171dfa0fbad55659efcc38324b82fedee /utils/macchanger
parent18be1b77cf7648b8b5d9d271d23b3d17f18c7cc5 (diff)
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>
Diffstat (limited to 'utils/macchanger')
-rw-r--r--utils/macchanger/Makefile2
-rw-r--r--utils/macchanger/patches/0001-fix-build-with-musl.patch13
2 files changed, 14 insertions, 1 deletions
diff --git a/utils/macchanger/Makefile b/utils/macchanger/Makefile
index 667f1d1cb..2bfcbbf2d 100644
--- a/utils/macchanger/Makefile
+++ b/utils/macchanger/Makefile
@@ -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
index 000000000..4a30d5510
--- /dev/null
+++ b/utils/macchanger/patches/0001-fix-build-with-musl.patch
@@ -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");