All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkcs11-helper: fix build with libnss
@ 2021-07-31  7:20 Fabrice Fontaine
  2021-07-31  9:11 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-07-31  7:20 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Build is broken since bump of libnss to version 3.68 in commit
0a73b9b962421ce7a72c88e5f5bbd8849f21b041

Fixes:
 - http://autobuild.buildroot.org/results/1e8113d638fcb73538329511eeac9f5e7cb04d6a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-nss-use-nss-pkcs11-h.patch           | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 package/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch

diff --git a/package/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch b/package/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch
new file mode 100644
index 0000000000..d0b573446f
--- /dev/null
+++ b/package/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch
@@ -0,0 +1,62 @@
+From d159a5c59c80552c3e8ea75d9bcf29b3a8e8289d Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 30 Jul 2021 20:06:36 +0300
+Subject: [PATCH] nss: use nss pkcs11.h
+
+make nss happy with its own extensions and non-standard behavior.
+[Retrieved (and updated to remove ChangeLog update) from:
+https://github.com/OpenSC/pkcs11-helper/pull/39]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ ChangeLog                 |  1 +
+ lib/_pkcs11h-crypto-nss.c | 14 ++++++++++----
+ lib/common.h              |  7 +++++++
+ 3 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/lib/_pkcs11h-crypto-nss.c b/lib/_pkcs11h-crypto-nss.c
+index 4b70e826..f57f9e6b 100644
+--- a/lib/_pkcs11h-crypto-nss.c
++++ b/lib/_pkcs11h-crypto-nss.c
+@@ -48,15 +48,21 @@
+  * POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#include "common.h"
+-
+-#include "_pkcs11h-crypto.h"
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
+ 
+ #if defined(ENABLE_PKCS11H_ENGINE_NSS)
+-#define _PKCS11T_H_ /* required so no conflict with ours */
+ #include <nss.h>
+ #include <cert.h>
+ 
++/* Use PKCS#11 of nss to avoid conflicts and make nss happy with its own extensions */
++#define PKCS11_H 1
++
++#include "common.h"
++
++#include "_pkcs11h-crypto.h"
++
+ static
+ int
+ __pkcs11h_crypto_nss_initialize (
+diff --git a/lib/common.h b/lib/common.h
+index 61a958af..2499e9c5 100644
+--- a/lib/common.h
++++ b/lib/common.h
+@@ -72,5 +72,12 @@
+ 
+ #define _PKCS11H_ASSERT		assert
+ 
++#ifndef FALSE
++#define FALSE 0
++#endif
++#ifndef TRUE
++#define TRUE 1
++#endif
++
+ #endif
+ 
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/pkcs11-helper: fix build with libnss
  2021-07-31  7:20 [Buildroot] [PATCH 1/1] package/pkcs11-helper: fix build with libnss Fabrice Fontaine
@ 2021-07-31  9:11 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-07-31  9:11 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

On Sat, 31 Jul 2021 09:20:33 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Build is broken since bump of libnss to version 3.68 in commit
> 0a73b9b962421ce7a72c88e5f5bbd8849f21b041
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/1e8113d638fcb73538329511eeac9f5e7cb04d6a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0001-nss-use-nss-pkcs11-h.patch           | 62 +++++++++++++++++++
>  1 file changed, 62 insertions(+)
>  create mode 100644 package/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-31  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  7:20 [Buildroot] [PATCH 1/1] package/pkcs11-helper: fix build with libnss Fabrice Fontaine
2021-07-31  9:11 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.