Merge pull request #8298 from maxice8/ifupdown
ifupdown: fix musl build.
This commit is contained in:
commit
cb19f0705d
2 changed files with 53 additions and 6 deletions
52
srcpkgs/ifupdown/patches/fix-musl.patch
Normal file
52
srcpkgs/ifupdown/patches/fix-musl.patch
Normal file
|
@ -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"))
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue