From a39806892d4c49ea099c2adf98058fbabd6ee7c8 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Wed, 18 Oct 2017 12:55:52 -0200 Subject: [PATCH] ifupdown: fix musl build. --- srcpkgs/ifupdown/patches/fix-musl.patch | 52 +++++++++++++++++++++++++ srcpkgs/ifupdown/template | 7 +--- 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/ifupdown/patches/fix-musl.patch diff --git a/srcpkgs/ifupdown/patches/fix-musl.patch b/srcpkgs/ifupdown/patches/fix-musl.patch new file mode 100644 index 0000000000..83803ae4a2 --- /dev/null +++ b/srcpkgs/ifupdown/patches/fix-musl.patch @@ -0,0 +1,52 @@ +--- main.c ++++ main.c +@@ -19,6 +19,10 @@ + #include "archcommon.h" + #include "header.h" + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + static const char *argv0; + bool no_act = false; + bool run_scripts = true; +--- archhurd.c ++++ archhurd.c +@@ -6,6 +6,10 @@ + + #include "archcommon.h" + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + bool variable_match(const char *iface, const char *variable, const char *pattern) { + if (!strcasecmp(variable, "name")) + return fnmatch(pattern, iface, FNM_EXTMATCH) == 0; +--- archkfreebsd.c ++++ archkfreebsd.c +@@ -9,6 +9,10 @@ + + #include "archcommon.h" + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + static bool match_mac(const char *iface, const char *pattern) { + for (struct ifaddrs *ifa = ifap; ifa; ifa = ifa->ifa_next) { + if (ifa->ifa_addr->sa_family != AF_LINK) +--- archlinux.c ++++ archlinux.c +@@ -10,6 +10,10 @@ + + #include "archcommon.h" + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + bool variable_match(const char *iface, const char *variable, const char *pattern) { + // Map platform-independent variables to sysfs names + if(!strcasecmp(variable, "mac")) diff --git a/srcpkgs/ifupdown/template b/srcpkgs/ifupdown/template index c12b8766a7..c6a1f34223 100644 --- a/srcpkgs/ifupdown/template +++ b/srcpkgs/ifupdown/template @@ -1,7 +1,7 @@ # Template file for 'ifupdown' pkgname=ifupdown version=0.8.25 -revision=1 +revision=2 wrksrc=$pkgname build_style=gnu-makefile make_use_env=1 @@ -20,11 +20,6 @@ make_dirs="/etc/network/interfaces.d 0755 root root /etc/network/if-post-down.d 0755 root root" conf_files="/etc/network/interfaces" -case "${XBPS_TARGET_MACHINE}" in - *-musl) broken=https://travis-ci.org/the-maldridge/void-packages/jobs/255103617 -esac - - post_install() { vman interfaces.5 vman ifup.8