aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>2017-12-15 14:38:55 +0100
committerGitHub <noreply@github.com>2017-12-15 14:38:55 +0100
commitcfec94a01b19415858f6fe7071d3a3ae64b54db7 (patch)
tree30f3e6ebb924ddd42fe43b92268fdd4c375fee75
parent343006bea93384ee3645d25e335bbaf2b635284f (diff)
parent0d2f9d9bd6c21297fb7254c84c7174dd77f9f4b1 (diff)
Merge pull request #5244 from yousong/p11-err.h
openconnect: fix compilation against libp11 >= 0.4.7
-rw-r--r--libs/libp11/Makefile2
-rw-r--r--net/openconnect/Makefile2
-rw-r--r--net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch50
3 files changed, 52 insertions, 2 deletions
diff --git a/libs/libp11/Makefile b/libs/libp11/Makefile
index 6d86cd1a7..448521260 100644
--- a/libs/libp11/Makefile
+++ b/libs/libp11/Makefile
@@ -42,7 +42,7 @@ CONFIGURE_ARGS += --with-enginesdir=/usr/lib/engines
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/libp11.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.{a,so} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so* $(1)/usr/lib/
diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
index 4e70f5a5e..604a00557 100644
--- a/net/openconnect/Makefile
+++ b/net/openconnect/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=7.08
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch b/net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch
new file mode 100644
index 000000000..c6e139a4c
--- /dev/null
+++ b/net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch
@@ -0,0 +1,50 @@
+From 03ecd34e0137b3f0bf0d2fc3ab7f7d8b3682785e Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Thu, 14 Dec 2017 18:03:35 +0800
+Subject: [PATCH] Fix compilation with libp11 version >= 0.4.7
+
+libp11 0.4.7 renamed then dropped macro definition in commits
+
+ 4f0fce4: Error reporting fixes
+ e4c641b: PKCS11 errors separated into P11 and CKR
+
+This change assumes that libp11 will restore compatibility by bringing
+back old forms of macro definition
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ openssl-pkcs11.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/openssl-pkcs11.c b/openssl-pkcs11.c
+index 61da123..ba7e491 100644
+--- a/openssl-pkcs11.c
++++ b/openssl-pkcs11.c
+@@ -30,6 +30,24 @@
+ #include <libp11.h>
+ #include <p11-kit/pkcs11.h>
+
++#ifndef ERR_LIB_PKCS11
++# if defined(ERR_LIB_CKR)
++# define ERR_LIB_PKCS11 ERR_LIB_CKR
++# elif defined(ERR_LIB_USER)
++# define ERR_LIB_PKCS11 ERR_LIB_USER
++# else
++# error undefined macro ERR_LIB_PKCS11
++# endif
++#endif
++
++#ifndef PKCS11_F_PKCS11_LOGIN
++# if defined(CKR_F_PKCS11_LOGIN)
++# define PKCS11_F_PKCS11_LOGIN CKR_F_PKCS11_LOGIN
++# else
++# error undefined macro PKCS11_F_PKCS11_LOGIN
++# endif
++#endif
++
+ static PKCS11_CTX *pkcs11_ctx(struct openconnect_info *vpninfo)
+ {
+ PKCS11_CTX *ctx;
+--
+1.8.3.1
+