From patchwork Wed Mar 8 18:56:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 736681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vdjRw3pDfz9sCX for ; Thu, 9 Mar 2017 05:56:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="r0U0uMKt"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7E802883A4; Wed, 8 Mar 2017 18:56:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bLheTYc7P7Qa; Wed, 8 Mar 2017 18:56:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A207E88397; Wed, 8 Mar 2017 18:56:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 186B81BFBC7 for ; Wed, 8 Mar 2017 18:56:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0B1C1307B3 for ; Wed, 8 Mar 2017 18:56:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 521IlU63t6mJ for ; Wed, 8 Mar 2017 18:56:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by silver.osuosl.org (Postfix) with ESMTPS id 4D2EE307B0 for ; Wed, 8 Mar 2017 18:56:38 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id n11so7558516wma.0 for ; Wed, 08 Mar 2017 10:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=xXvCmlcOK3Zrm1MNpVsLUboCysSV2BCIc6eYJvJfPtI=; b=r0U0uMKt04IFPG9s/L5RzmegQ4/jWFhTORy8U42nG7HWxTfQxu2L9wcUZ9bSBCRbgA 4+1o/uEpnI+tsiFgERgcinbyvVbqJFWlyjZ9sCLGZP2VWj/qdTHl//NvItrbMPFEpAZG hv3U0KroWyYA59ltTXmNvI93PNM+12efP+RTTvvi9iDh3yUBwh9eDwwu79db1+JOU5yq Lg6ZKzrsRREaVyWqYp22YcXOIwqG7Z4kFCQsX7i+CSwV+KOilFwUBLKDplSQrrQWqS1K e0FCcwTKFAZRxkWHE7mFOvXRmBkju6NM98F96ub07V/N8jDT8XSwOeSk3tAwoQKl5aEb AnBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=xXvCmlcOK3Zrm1MNpVsLUboCysSV2BCIc6eYJvJfPtI=; b=kc67Awu5cJ+RTyM5RkkHioo3Bpp9SF75lhOrTKfJrHaz6cQsH9/npchpyGyrvxsEHK eq37SAko53wZT6c2IfznVLbkp2X2vSdjuKJSUC9GIvzVUWIOz89dOcfdTLgh0BsanAu9 X1ePZ5hON/nOnAPh8+SidP3cQ8IJ9RL7RlftsJzByKAoQuDSamJO/XVpF4gwWYW/Rfi/ qhPfiIdwkhm9rSVh+vL+K9n3NNJ3P0PHnPYQX1E+ldQ7hgqh0k8urOvZZi0T4J4KxiOW 71OkEKM8Cvbi/Y9Zvv0a1p40NcK5S5G5jLhklg2ggqIJr07NdBUWtaWbp63ZnHHCtMab PX5Q== X-Gm-Message-State: AMke39kzXezKJLd9O5V6you5FiE5SFwVPvWPoY3W01ccZmDCGqTIYY3oo+cmaY5UsWbcXQ== X-Received: by 10.28.169.199 with SMTP id s190mr24160780wme.2.1488999396722; Wed, 08 Mar 2017 10:56:36 -0800 (PST) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id v130sm24283016wmv.2.2017.03.08.10.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Mar 2017 10:56:35 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Wed, 8 Mar 2017 19:56:23 +0100 Message-Id: <1488999383-18704-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 Cc: Ilias Apalodimas , "Yann E. MORIN" Subject: [Buildroot] [PATCH] package/keepalived: fix compilation with musl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backport one patch from upstream to fix build without netlink. Add two patches to fix integer types. Fixes: http://autobuild.buildroot.org/results/b61/b61c2cfa949c2a20f0702522857d78651207e6d2/ Signed-off-by: "Yann E. MORIN" Cc: Ilias Apalodimas --- ...onal-compilation-for-LIBIPVS-without-netl.patch | 35 +++++++++ .../0002-check-libipvs-add-missing-include.patch | 36 +++++++++ .../0003-keepalived-ip_vs-fix-integer-types.patch | 87 ++++++++++++++++++++++ 3 files changed, 158 insertions(+) create mode 100644 package/keepalived/0001-Fix-conditional-compilation-for-LIBIPVS-without-netl.patch create mode 100644 package/keepalived/0002-check-libipvs-add-missing-include.patch create mode 100644 package/keepalived/0003-keepalived-ip_vs-fix-integer-types.patch diff --git a/package/keepalived/0001-Fix-conditional-compilation-for-LIBIPVS-without-netl.patch b/package/keepalived/0001-Fix-conditional-compilation-for-LIBIPVS-without-netl.patch new file mode 100644 index 0000000..ff2787c --- /dev/null +++ b/package/keepalived/0001-Fix-conditional-compilation-for-LIBIPVS-without-netl.patch @@ -0,0 +1,35 @@ +From 79be21b0ace51d87e80d5a1baa439f726ccc2e69 Mon Sep 17 00:00:00 2001 +From: Quentin Armitage +Date: Tue, 29 Nov 2016 11:37:15 +0000 +Subject: [PATCH] Fix conditional compilation for LIBIPVS without netlink + +Signed-off-by: Quentin Armitage +[yann.morin.1998@free.fr: backport from upstream 79be21b] +Signed-off-by: "Yann E. MORIN" +--- + keepalived/check/libipvs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/keepalived/check/libipvs.c b/keepalived/check/libipvs.c +index 1a7394a..5054daa 100644 +--- a/keepalived/check/libipvs.c ++++ b/keepalived/check/libipvs.c +@@ -162,6 +162,7 @@ static struct nla_policy ipvs_stats_policy[IPVS_STATS_ATTR_MAX + 1] = { + CHECK_IPV4(s, ret); + #endif + ++#ifdef LIBIPVS_USE_NL + #ifndef NLA_PUT_S32 + #define NLA_PUT_S32(msg, attrtype, value) \ + NLA_PUT_TYPE(msg, int32_t, attrtype, value) +@@ -173,7 +174,6 @@ nla_get_s32(struct nlattr *attr) + } + #endif + +-#ifdef LIBIPVS_USE_NL + #ifndef FALLBACK_LIBNL1 + static int nlerr2syserr(int err) + { +-- +2.7.4 + diff --git a/package/keepalived/0002-check-libipvs-add-missing-include.patch b/package/keepalived/0002-check-libipvs-add-missing-include.patch new file mode 100644 index 0000000..253c2bc --- /dev/null +++ b/package/keepalived/0002-check-libipvs-add-missing-include.patch @@ -0,0 +1,36 @@ +From accf32b0a293fbb3d877c9610e77f185e1e0d7d7 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Wed, 8 Mar 2017 19:05:58 +0100 +Subject: [PATCH] check/libipvs: add missing include + +u_int16_t et al. are from stdint.h, so it needs to be included. + +It happens to work on glibc and uClibc, becasue those C libraries are +very much lax on what headers they internally include, so stdint.h is +pulled in automagically. + +However, musl is very conservative and standards-compliant, so its +headers do not internally include much. + +Signed-off-by: "Yann E. MORIN" +--- +Upstream status: https://github.com/acassen/keepalived/pull/540 +--- + keepalived/check/libipvs.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/keepalived/check/libipvs.c b/keepalived/check/libipvs.c +index 58c2746..9766fa7 100644 +--- a/keepalived/check/libipvs.c ++++ b/keepalived/check/libipvs.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #ifdef LIBIPVS_USE_NL + #include +-- +2.7.4 + diff --git a/package/keepalived/0003-keepalived-ip_vs-fix-integer-types.patch b/package/keepalived/0003-keepalived-ip_vs-fix-integer-types.patch new file mode 100644 index 0000000..d499dac --- /dev/null +++ b/package/keepalived/0003-keepalived-ip_vs-fix-integer-types.patch @@ -0,0 +1,87 @@ +From db4ed22c5b46cc7e0eb3096cfd4ce73f26537c65 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Wed, 8 Mar 2017 19:18:49 +0100 +Subject: [PATCH] keepalived/ip_vs: fix integer types + +The correct, standard integer types are uint8_t and uint16_t, not +u_int8_t nor u_int16_t (the latter being kernel types). + +glibc and uClibc may define the kernel-compatible types, but musl (which +is standards-compliant) does not. + +Signed-off-by: "Yann E. MORIN" +--- +Upstream status: https://github.com/acassen/keepalived/pull/540 +--- + keepalived/include/ip_vs.h | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/keepalived/include/ip_vs.h b/keepalived/include/ip_vs.h +index 391fd6e..07d0ae4 100644 +--- a/keepalived/include/ip_vs.h ++++ b/keepalived/include/ip_vs.h +@@ -36,7 +36,7 @@ typedef struct ip_vs_stats_user ip_vs_stats_t; + + struct ip_vs_service_app { + struct ip_vs_service_user user; +- u_int16_t af; ++ uint16_t af; + union nf_inet_addr nf_addr; + #ifdef _HAVE_PE_NAME_ + char pe_name[IP_VS_PENAME_MAXLEN]; +@@ -45,7 +45,7 @@ struct ip_vs_service_app { + + struct ip_vs_dest_app { + struct ip_vs_dest_user user; +- u_int16_t af; ++ uint16_t af; + union nf_inet_addr nf_addr; + }; + +@@ -53,7 +53,7 @@ struct ip_vs_dest_app { + struct ip_vs_service_entry_app { + struct ip_vs_service_entry user; + ip_vs_stats_t stats; +- u_int16_t af; ++ uint16_t af; + union nf_inet_addr nf_addr; + #ifdef _HAVE_PE_NAME_ + char pe_name[IP_VS_PENAME_MAXLEN]; +@@ -64,7 +64,7 @@ struct ip_vs_service_entry_app { + struct ip_vs_dest_entry_app { + struct ip_vs_dest_entry user; + ip_vs_stats_t stats; +- u_int16_t af; ++ uint16_t af; + union nf_inet_addr nf_addr; + + }; +@@ -84,7 +84,7 @@ struct ip_vs_get_dests_app { + struct ip_vs_dest_entry_app entrytable[0]; + } user; + +- u_int16_t af; ++ uint16_t af; + union nf_inet_addr nf_addr; + }; + +@@ -126,13 +126,13 @@ struct ip_vs_daemon_app { + uint16_t sync_maxlen; + + /* Multicast Port (base) */ +- u_int16_t mcast_port; ++ uint16_t mcast_port; + + /* Multicast TTL */ +- u_int8_t mcast_ttl; ++ uint8_t mcast_ttl; + + /* Multicast Address Family */ +- u_int16_t mcast_af; ++ uint16_t mcast_af; + + /* Multicast Address */ + union nf_inet_addr mcast_group; +-- +2.7.4 +