diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-08-15 09:13:20 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-08-15 09:13:40 +0300 |
commit | 526f9e64d4acf56628097648cba631e6bf70e1a8 (patch) | |
tree | 07a7de06b9148d220afcca6674fe9c476bc167df /community/libreswan | |
parent | 579154ef314d6ebd7f7d8edf16eff210b94b71c0 (diff) | |
download | aports-526f9e64d4acf56628097648cba631e6bf70e1a8.tar.bz2 aports-526f9e64d4acf56628097648cba631e6bf70e1a8.tar.xz |
community/libreswan: upstream suggested HOST_NAME_MAX fix, remove $depends_dev
Diffstat (limited to 'community/libreswan')
-rw-r--r-- | community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch | 86 | ||||
-rw-r--r-- | community/libreswan/APKBUILD | 12 | ||||
-rw-r--r-- | community/libreswan/fix-host-name-max.patch | 11 |
3 files changed, 93 insertions, 16 deletions
diff --git a/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch b/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch new file mode 100644 index 0000000000..2d2d9fbb1c --- /dev/null +++ b/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch @@ -0,0 +1,86 @@ +From ee7952c5112a2b08c1b196cabd946e0b3c3dc74a Mon Sep 17 00:00:00 2001 +From: Antony Antony <antony@phenome.org> +Date: Mon, 14 Aug 2017 20:52:18 +0200 +Subject: [PATCH] posix: use HOST_NAME_MAX consitently from limits.h + +--- + lib/libswan/id.c | 5 +---- + ports/linux/include/sysdep.h | 2 +- + programs/pluto/ikev2_ipseckey.c | 2 +- + programs/pluto/rcv_whack.c | 4 ---- + 4 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/lib/libswan/id.c b/lib/libswan/id.c +index 06cc751..b89650a 100644 +--- a/lib/libswan/id.c ++++ b/lib/libswan/id.c +@@ -22,10 +22,6 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> +-#include <unistd.h> +-#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */ +-#define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */ +-#endif + + #include <libreswan.h> + +@@ -34,6 +30,7 @@ + #include "libreswan/passert.h" + #include "lswalloc.h" + #include "lswlog.h" ++#include "sysdep.h" + #include "id.h" + #include "x509.h" + #include <cert.h> +diff --git a/ports/linux/include/sysdep.h b/ports/linux/include/sysdep.h +index deb2ac1..b782b2c 100644 +--- a/ports/linux/include/sysdep.h ++++ b/ports/linux/include/sysdep.h +@@ -5,7 +5,7 @@ + #define TimeZoneOffset timezone + + #include <limits.h> +-/* POSIX 1003.1-2001 says <unistd.h> defines this */ ++/* POSIX 1003.1-2001 says <limits.h> defines this */ + #ifndef HOST_NAME_MAX + /* some don't even use _POSIX_HOST_NAME_MAX */ + # ifdef _POSIX_HOST_NAME_MAX +diff --git a/programs/pluto/ikev2_ipseckey.c b/programs/pluto/ikev2_ipseckey.c +index 45872ef..1d32d37 100644 +--- a/programs/pluto/ikev2_ipseckey.c ++++ b/programs/pluto/ikev2_ipseckey.c +@@ -22,7 +22,6 @@ + #include <string.h> + #include <stddef.h> + #include <stdlib.h> +-#include <unistd.h> + #include <errno.h> + #include <arpa/inet.h> /* for inet_ntop */ + #include <arpa/nameser.h> +@@ -31,6 +30,7 @@ + #include "unbound-event.h" + #include "libreswan.h" + #include "lswlog.h" ++#include "sysdep.h" + #include "defs.h" + #include "log.h" + #include "constants.h" /* for demux.h */ +diff --git a/programs/pluto/rcv_whack.c b/programs/pluto/rcv_whack.c +index baa9fdf..9a53ed5 100644 +--- a/programs/pluto/rcv_whack.c ++++ b/programs/pluto/rcv_whack.c +@@ -28,10 +28,6 @@ + #include <stddef.h> + #include <stdlib.h> + #include <string.h> +-#include <unistd.h> +-#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */ +-# define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */ +-#endif + #include <errno.h> + #include <sys/types.h> + #include <sys/socket.h> +-- +2.9.4 + diff --git a/community/libreswan/APKBUILD b/community/libreswan/APKBUILD index 01e1c33b6c..5f134090d2 100644 --- a/community/libreswan/APKBUILD +++ b/community/libreswan/APKBUILD @@ -2,18 +2,20 @@ pkgname=libreswan pkgver=3.21 -pkgrel=0 +pkgrel=1 pkgdesc="IPsec implementation for Linux" url="https://libreswan.org" arch="all" license="GPLv2" depends="nss-tools iproute2" -depends_dev="gmp-dev linux-pam-dev nss-dev unbound-dev libcap-ng-dev curl-dev nspr-dev bsd-compat-headers" provides="openswan" -makedepends="$depends_dev bison flex coreutils bash xmlto" +makedepends="bison flex coreutils bash xmlto + gmp-dev linux-pam-dev nss-dev unbound-dev libcap-ng-dev + curl-dev nspr-dev bsd-compat-headers + " subpackages="$pkgname-doc" source="https://download.libreswan.org/libreswan-$pkgver.tar.gz - fix-host-name-max.patch + 0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch " builddir="$srcdir"/$pkgname-$pkgver @@ -41,4 +43,4 @@ package() { } sha512sums="f1ef002b3e0869920edfebfc8efd73d9a9f84f64a77ad4832f46b12dfdd3c31cdf48c1473522b63f155058592c46af05995756af5440ca3e9c0fa5207436e0fc libreswan-3.21.tar.gz -53a46148e8bcdff89acecd03b38d07133fae2c95fb76b1c9f28e5a597d9468a071d41e637b7d84def8d0d61823d97b9b0f29daca4e31bfabc8babeb9c9082d42 fix-host-name-max.patch" +30f1db63eb4df5d56d81f241ff15dece5b2fe1c3dea93e692e709bab67f95e8afacd534aea0e368d26fda02da7e551c03871bf793e5cf756ee8f75c3e9ef9c44 0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch" diff --git a/community/libreswan/fix-host-name-max.patch b/community/libreswan/fix-host-name-max.patch deleted file mode 100644 index 13d0fd0d2c..0000000000 --- a/community/libreswan/fix-host-name-max.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru libreswan-3.21.orig/programs/pluto/ikev2_ipseckey.c libreswan-3.21/programs/pluto/ikev2_ipseckey.c ---- libreswan-3.21.orig/programs/pluto/ikev2_ipseckey.c 2017-08-09 20:47:34.000000000 +0000 -+++ libreswan-3.21/programs/pluto/ikev2_ipseckey.c 2017-08-14 12:00:26.380840562 +0000 -@@ -23,6 +23,7 @@ - #include <stddef.h> - #include <stdlib.h> - #include <unistd.h> -+#include <limits.h> - #include <errno.h> - #include <arpa/inet.h> /* for inet_ntop */ - #include <arpa/nameser.h> |