diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-01 13:26:23 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-01 13:26:56 +0200 |
commit | 26b9b542ae58fe0d94f7a7c5fc70caf894317202 (patch) | |
tree | 80597a2bc6fce013b9c90446d6f1b1bdff320645 /main/coova-chilli | |
parent | 15dabba52e97aa91b2882712741184396c3f7ae8 (diff) | |
download | aports-26b9b542ae58fe0d94f7a7c5fc70caf894317202.tar.bz2 aports-26b9b542ae58fe0d94f7a7c5fc70caf894317202.tar.xz |
main/coova-chilli: build fixes for musl
Diffstat (limited to 'main/coova-chilli')
-rw-r--r-- | main/coova-chilli/100-fix-sysinfo-redeclaration.patch | 24 | ||||
-rw-r--r-- | main/coova-chilli/APKBUILD | 16 | ||||
-rw-r--r-- | main/coova-chilli/chilli_limits.patch | 15 | ||||
-rw-r--r-- | main/coova-chilli/posix-regex.patch | 93 | ||||
-rw-r--r-- | main/coova-chilli/system.patch | 40 |
5 files changed, 160 insertions, 28 deletions
diff --git a/main/coova-chilli/100-fix-sysinfo-redeclaration.patch b/main/coova-chilli/100-fix-sysinfo-redeclaration.patch deleted file mode 100644 index 446eb63ce..000000000 --- a/main/coova-chilli/100-fix-sysinfo-redeclaration.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/system.h -+++ b/src/system.h -@@ -76,10 +76,6 @@ - #include <sys/stat.h> - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include <sys/sysinfo.h> --#endif -- - #ifdef HAVE_TIME_H - #include <time.h> - #endif -@@ -132,6 +128,10 @@ - #include <linux/un.h> - #endif - -+#ifdef HAVE_SYS_SYSINFO_H -+#include <sys/sysinfo.h> -+#endif -+ - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - #include <net/if.h> - #include <net/bpf.h> diff --git a/main/coova-chilli/APKBUILD b/main/coova-chilli/APKBUILD index b79cd77dd..eab33f76b 100644 --- a/main/coova-chilli/APKBUILD +++ b/main/coova-chilli/APKBUILD @@ -15,7 +15,9 @@ pkggroups="chilli" subpackages="$pkgname-doc $pkgname-dev" source="http://ap.coova.org/chilli/coova-chilli-$pkgver.tar.gz automake.patch - 100-fix-sysinfo-redeclaration.patch + chilli_limits.patch + posix-regex.patch + system.patch " _builddir="$srcdir/$pkgname-$pkgver" @@ -81,10 +83,16 @@ package() { md5sums="dc0037e3cdebcb60508081b4e42e984a coova-chilli-1.3.0.tar.gz b3aaf43bcdb5cfbf39d1c730d1de1a3b automake.patch -e1d1a4c5573330e40a651cd2d7c027e7 100-fix-sysinfo-redeclaration.patch" +95d7550c5c29bcb3d41ec8e4b1597d23 chilli_limits.patch +42918782a1c9f377c665c89a3dcc91b6 posix-regex.patch +ba24925e6a3290a928e8ca65c5372fa1 system.patch" sha256sums="ca24ac274340c65a8e7ff704e6866a04380a87c444f261ba84097f0bd1c162e8 coova-chilli-1.3.0.tar.gz 16f529c7deee24155bd900a3f64fc110207d435ad12bd91e71823acd6156ab25 automake.patch -8da92965f81761c6e90b6dacd0cc1003caa013b8967b81f297baefc708dd58a9 100-fix-sysinfo-redeclaration.patch" +e3a31714aa9395f6be01cf0cd2899dc0f6934cd2954fa16af186b527be1aa09a chilli_limits.patch +e9f989efaf07dee4cea55f1ce02a7e820cee39973031dd25a33a737ba51dfa6b posix-regex.patch +775250d76935310c68a7a7f400ec3fbbc779212a34e568acab734191a3f209ad system.patch" sha512sums="40dd77a6fb2877f46b0d6e84cfba9507dfac0999f6aff45d3a28bb64fd044b707cfeacd06d4bd411669e3a47cdc5ec14dbf79effee235174fbbf0b88c30015b3 coova-chilli-1.3.0.tar.gz 643b99f473753881f15e8b049ae1e071a8fe6164fd92b30a54ad27a0a8b58d26727ab82d28b587defc1f28f4213c64d298bf707b9bf6a3a98013578b26a79733 automake.patch -a87d179fd08f2e96aee327c131503e646697e6d75f8e75ff6a901d60ef4f958e495816b5ed7ee1946ba3d9bb5047bdc955c71943068c47c63fcf415d4a2b1df9 100-fix-sysinfo-redeclaration.patch" +b12f387fdce54281d134d20e1785e4a1af9fc02a532c82c955f970ab344822a20a12c6b4bed10b1adf3f4ddaa87f650048212ad25a82bfc4f6e955e23ba63c91 chilli_limits.patch +cafe0899ce95c7b75fcc54c3e70fd8b0d7962c05616c759bec45e16be41ad28a8304507dfc74fc14fe09923d7fdbd8f3c3351241256df63b06aba84ce11faffa posix-regex.patch +5d00133e48eb38995ac14e3ec136fa64cd447cc14dd93fda80c6c7ad28cc6704ce6a70561d3bb293f0c13fcef9fc4f01daa4dfed7f7ce8fa540e1fdc141041da system.patch" diff --git a/main/coova-chilli/chilli_limits.patch b/main/coova-chilli/chilli_limits.patch new file mode 100644 index 000000000..300dae931 --- /dev/null +++ b/main/coova-chilli/chilli_limits.patch @@ -0,0 +1,15 @@ +Index: src/chilli_limits.h +=================================================================== +--- a/src/chilli_limits.h (revision 492) ++++ b/src/chilli_limits.h (working copy) +@@ -18,8 +18,8 @@ + * + */ + +-#ifndef _LIMITS_H +-#define _LIMITS_H ++#ifndef _CHILLI_LIMITS_H ++#define _CHILLI_LIMITS_H + + /* + * extracted from various .h files, needs some cleanup. diff --git a/main/coova-chilli/posix-regex.patch b/main/coova-chilli/posix-regex.patch new file mode 100644 index 000000000..73cb417e1 --- /dev/null +++ b/main/coova-chilli/posix-regex.patch @@ -0,0 +1,93 @@ +Index: src/garden.h +=================================================================== +--- a/src/garden.h (revision 492) ++++ b/src/garden.h (working copy) +@@ -39,13 +39,18 @@ + (a)->port == (b)->port) + + #ifdef ENABLE_CHILLIREDIR ++struct chilli_regex { ++ regex_t re; ++ char allocated:1; ++}; ++ + typedef struct regex_pass_through_t { + char regex_host[512]; + char regex_path[512]; + char regex_qs[512]; +- regex_t re_host; +- regex_t re_path; +- regex_t re_qs; ++ struct chilli_regex re_host; ++ struct chilli_regex re_path; ++ struct chilli_regex re_qs; + char inuse:1; + char neg_host:1; + char neg_path:1; +Index: src/main-redir.c +=================================================================== +--- a/src/main-redir.c (revision 492) ++++ b/src/main-redir.c (working copy) +@@ -503,7 +503,7 @@ + } + + static int +-check_regex(regex_t *re, char *regex, char *s) { ++check_regex(struct chilli_regex *re, char *regex, char *s) { + int ret; + + #if(_debug_) +@@ -510,22 +510,19 @@ + log_dbg("Checking %s =~ %s", s, regex); + #endif + +-#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) +- if (!re->re_g) +-#else +- if (!re->allocated) +-#endif ++ if (!re->allocated) + { +- if ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { ++ if ((ret = regcomp(&re->re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { + char error[512]; +- regerror(ret, re, error, sizeof(error)); ++ regerror(ret, &re->re, error, sizeof(error)); + log_err(0, "regcomp(%s) failed (%s)", regex, error); + regex[0] = 0; + return -1; + } ++ re->allocated = 1; + } + +- if ((ret = regexec(re, s, 0, 0, 0)) == 0) { ++ if ((ret = regexec(&re->re, s, 0, 0, 0)) == 0) { + + log_dbg("Matched regex %s", regex); + return 0; +Index: src/options.c +=================================================================== +--- a/src/options.c (revision 492) ++++ b/src/options.c (working copy) +@@ -373,18 +373,12 @@ + + #ifdef ENABLE_CHILLIREDIR + for (i = 0; i < MAX_REGEX_PASS_THROUGHS; i++) { +-#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) +- regfree(&_options.regex_pass_throughs[i].re_host); +- regfree(&_options.regex_pass_throughs[i].re_path); +- regfree(&_options.regex_pass_throughs[i].re_qs); +-#else + if (_options.regex_pass_throughs[i].re_host.allocated) +- regfree(&_options.regex_pass_throughs[i].re_host); ++ regfree(&_options.regex_pass_throughs[i].re_host.re); + if (_options.regex_pass_throughs[i].re_path.allocated) +- regfree(&_options.regex_pass_throughs[i].re_path); ++ regfree(&_options.regex_pass_throughs[i].re_path.re); + if (_options.regex_pass_throughs[i].re_qs.allocated) +- regfree(&_options.regex_pass_throughs[i].re_qs); +-#endif ++ regfree(&_options.regex_pass_throughs[i].re_qs.re); + } + #endif + diff --git a/main/coova-chilli/system.patch b/main/coova-chilli/system.patch new file mode 100644 index 000000000..b5958f727 --- /dev/null +++ b/main/coova-chilli/system.patch @@ -0,0 +1,40 @@ +--- ./src/system.h.orig 2014-05-01 13:22:35.122472244 -0200 ++++ ./src/system.h 2014-05-01 13:23:19.896392972 -0200 +@@ -121,18 +121,6 @@ + #include <signal.h> + #endif + +-#if defined(__linux__) +-#include <asm/types.h> +-#include <linux/if.h> +-#include <linux/if_packet.h> +-#include <linux/if_ether.h> +-#include <linux/if_tun.h> +-#include <linux/netlink.h> +-#include <linux/rtnetlink.h> +-#ifndef HAVE_SYS_UN_H +-#include <linux/un.h> +-#endif +- + #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) + #include <net/if.h> + #include <net/bpf.h> +@@ -256,6 +244,18 @@ + #include <unistd.h> + #include <errno.h> + ++#if defined(__linux__) ++#include <asm/types.h> ++#include <linux/if.h> ++#include <linux/if_packet.h> ++#include <linux/if_ether.h> ++#include <linux/if_tun.h> ++#include <linux/netlink.h> ++#include <linux/rtnetlink.h> ++#ifndef HAVE_SYS_UN_H ++#include <linux/un.h> ++#endif ++ + #define safe_snprintf portable_snprintf + char *safe_strncpy(char *dst, const char *src, size_t size); + |