- jitterentropy-split-internal-header.patch:

Hide the non-GNUC constructs that are library internal from the 
  exported header. (bsc#1202870)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jitterentropy?expand=0&rev=16
This commit is contained in:
Marcus Meissner 2024-02-12 16:19:05 +00:00 committed by Git OBS Bridge
parent 433b8aff84
commit 336543bd27
3 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,41 @@
Index: jitterentropy-library-3.4.0/jitterentropy.h
===================================================================
--- jitterentropy-library-3.4.0.orig/jitterentropy.h
+++ jitterentropy-library-3.4.0/jitterentropy.h
@@ -42,6 +42,10 @@
#ifndef _JITTERENTROPY_H
#define _JITTERENTROPY_H
+#include <unistd.h>
+#include <errno.h>
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -98,11 +102,13 @@ extern "C" {
* Jitter RNG State Definition Section
***************************************************************************/
+#ifdef __JITTERENTROPY_INTERNAL
#if defined(_MSC_VER)
#include "arch/jitterentropy-base-windows.h"
#else
#include "jitterentropy-base-user.h"
#endif
+#endif
#define SHA3_256_SIZE_DIGEST_BITS 256
#define SHA3_256_SIZE_DIGEST (SHA3_256_SIZE_DIGEST_BITS >> 3)
Index: jitterentropy-library-3.4.0/Makefile
===================================================================
--- jitterentropy-library-3.4.0.orig/Makefile
+++ jitterentropy-library-3.4.0/Makefile
@@ -9,6 +9,7 @@ LDFLAGS +=-Wl,-z,relro,-z,now -lpthread
# Enable internal timer support
CFLAGS += -DJENT_CONF_ENABLE_INTERNAL_TIMER
+CFLAGS += -D__JITTERENTROPY_INTERNAL
GCCVERSIONFORMAT := $(shell echo `$(CC) -dumpversion | sed 's/\./\n/g' | wc -l`)
ifeq "$(GCCVERSIONFORMAT)" "3"

View File

@ -14,6 +14,13 @@ Wed Mar 22 11:17:59 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
* github.com/smuellerDD/jitterentropy-library/commit/7bf9f85
* Add jitterentropy-fix-a-stack-corruption-on-s390x.patch
-------------------------------------------------------------------
Tue Sep 13 12:34:39 UTC 2022 - Marcus Meissner <meissner@suse.com>
- jitterentropy-split-internal-header.patch:
Hide the non-GNUC constructs that are library internal from the
exported header. (bsc#1202870)
-------------------------------------------------------------------
Mon Sep 12 07:04:35 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package jitterentropy
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,6 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
Name: jitterentropy
@ -28,6 +29,7 @@ Source0: https://github.com/smuellerDD/jitterentropy-library/archive/refs
Source1: baselibs.conf
#PATCH-FIX-UPSTREAM github.com/smuellerDD/jitterentropy-library/commit/7bf9f85
Patch0: jitterentropy-fix-a-stack-corruption-on-s390x.patch
Patch1: jitterentropy-split-internal-header.patch
%description
The Jitter RNG provides a noise source using the CPU execution