From patchwork Fri Sep 28 12:05:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xabier Oneca -- xOneca X-Patchwork-Id: 976271 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GbjWnHD5"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JuCoBcSX"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42M9P52mNpz9s3x for ; Fri, 28 Sep 2018 22:05:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Content-Type:To: Message-ID:Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=q85+hbZA/x9vobYNSFfGIrrJA9c/75JvZ1QrY1FWPYw=; b=GbjWnHD5Fjaz4g/SVf3Ni7uyvq WEcGO8Ltwk8Fa8RF8YsF2fEZouzXzzI5RM9ZhwMn/kDj/6uFQVPap2IW4FRucioeajHWbOL+Uv+uq oY4CWG1WgggUY41HNtaLAwKI9nqSB+1nLs0eIi96FndxqcvF+Y9v1BC5kkia9QsEHHEh2u4Ie/osY S4NNv3/K4bKUNN53u3XcJ4tJRmE+4a6olkhTh9Npl18VJ8PqP479Z2RbpKp6bAm9jnoCR99/QNnxE 24lgPM6wsZXNmDKgoB/YEZjOffX+uRDfowWFS9xWZEbiFVUsZVteoX7c13//8jz6CLf1r/T5VoFye jE0n35Qg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5rWc-0005v0-Fb; Fri, 28 Sep 2018 12:05:38 +0000 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5rWY-0005tm-JX for openwrt-devel@lists.openwrt.org; Fri, 28 Sep 2018 12:05:36 +0000 Received: by mail-ot1-x341.google.com with SMTP id o13-v6so5777647otl.4 for ; Fri, 28 Sep 2018 05:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=WvnTw35ePvjCLagayZjjeACJi52t0HAH5Ud5fH2A1gQ=; b=JuCoBcSXCJpZEGVYTpBarNdXzIml+mPWx1ywJRlPjwNOLCggXt3tYqW7tdgkuyaG0S bDCdCv7WFzQ29kw3lFDSNrtxiwUspC2BTOgx1t34mIpP1svCPZb6Tek9WupG2qOAPzvh ak0d6JZnqtZb4ivgFbCkhsm1N6f2e1A1dPubTzvAgjydlF5RoJzoLtQqOeO3xVFRacWQ ZViYKC/RmqsWUt2IIul324gEA7DovKxfPXmIAwGPJisWA3RGCoul89v+yz4F3u0RjSsG mG7hZMfrDoBO2njM0Pc+r/1W/tFrNvw22CKvfC8KzMkhy5K0pT+pkFxs2XZKNSLqfRI9 IhAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WvnTw35ePvjCLagayZjjeACJi52t0HAH5Ud5fH2A1gQ=; b=dqDDo8pCOEWNA21gt6D4UKxgNWsx8Cu3LRwzVbIxO5lFLyTvI6Q015adlW216DZ2Fw GQdXdZmLKP76zrpYSDha0cdG/RW1F9BEHrvIcwS47lK5Szp4493ZLFcL7I5dNzHc4AAh GcrROeAs39Y9qIKoL6byxo8tPZoF7nhwyQunwMoy7dQlbplxniZTnZ50qN5IQJ5oTgGa 6Geo/fsO2tQUmm1evJLCRa1pelmHhE/VuFqVB5DCIeuSkmbgAsSfTJ9i+27t67z9e5s+ m0pCroU1MsECPlO8HyT4HJwyK+KvUSqwwBPLwgXafPe3RqIdE7rQ+S8xqSNya36MJUkM p2lA== X-Gm-Message-State: ABuFfohCz8DtcO9NlKNAGlaBMjSNTQQOu2pcpRoq4DOLPW9cJNlT/7T2 YdA6Aat+X+hUlfr+y1/ZFu1Ayo8dyjzGXQvo1Sr2WWwy X-Google-Smtp-Source: ACcGV61tRR9JQe5pEQOR/5sdG/iAtBhu6V4QO9QgykAYnE09fWjZ0XOaTixetJTT+giv7q7pWkPhivFXlIrLxGkDNUk= X-Received: by 2002:a9d:437:: with SMTP id 52-v6mr9875027otc.31.1538136322096; Fri, 28 Sep 2018 05:05:22 -0700 (PDT) MIME-Version: 1.0 From: Xabier Oneca -- xOneca Date: Fri, 28 Sep 2018 14:05:09 +0200 Message-ID: To: openwrt-devel@lists.openwrt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180928_050534_671494_6862F84D X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (xoneca[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH] coova-chilli: fix compilation error with --enable-redir X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org musl lacks `allocated` member on `struct re_pattern_buffer` (https://fossies.org/dox/musl-1.1.20/structre__pattern__buffer.html). Patch inspired by drkhosla @github.com/coova/coova-chilli issue #200 (https://github.com/coova/coova-chilli/issues/200#issuecomment-253497070) Signed-off-by: Xabier Oneca --- .../300-fix-compile-with-enable-redirurl.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 net/coova-chilli/patches/300-fix-compile-with-enable-redirurl.patch + { + if ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { + char error[512]; -- 1.9.1 From 356a46491329eb9f6f743c5c567cb99c791a02a5 Mon Sep 17 00:00:00 2001 From: Xabier Oneca Date: Fri, 28 Sep 2018 11:16:57 +0200 Subject: [PATCH] coova-chilli: fix compilation error with --enable-redir musl lacks `allocated` member on `struct re_pattern_buffer` (https://fossies.org/dox/musl-1.1.20/structre__pattern__buffer.html). Patch inspired by the one posted by drkhosla at github.com/coova/coova-chilli issue #200 (https://github.com/coova/coova-chilli/issues/200#issuecomment-253497070). Signed-off-by: Xabier Oneca --- .../300-fix-compile-with-enable-redirurl.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 net/coova-chilli/patches/300-fix-compile-with-enable-redirurl.patch diff --git a/net/coova-chilli/patches/300-fix-compile-with-enable-redirurl.patch b/net/coova-chilli/patches/300-fix-compile-with-enable-redirurl.patch new file mode 100644 index 0000000..b7ae041 --- /dev/null +++ b/net/coova-chilli/patches/300-fix-compile-with-enable-redirurl.patch @@ -0,0 +1,25 @@ +--- a/src/options.c ++++ b/src/options.c +@@ -377,7 +377,7 @@ int options_fromfd(int fd, bstring bt) { + + #ifdef ENABLE_CHILLIREDIR + for (i = 0; i < MAX_REGEX_PASS_THROUGHS; i++) { +-#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) ++#if defined (__linux__) || 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); +--- a/src/main-redir.c ++++ b/src/main-redir.c +@@ -508,11 +508,6 @@ check_regex(regex_t *re, char *regex, ch + syslog(LOG_DEBUG, "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 ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { + char error[512]; -- 1.9.1