Notification time stamped 2023-02-01 02:05:17 UTC
From 827fc3c8eef4c6b01cddf97ce2d1d379601e4773 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
Date: Jan 03 2023 09:14:21 +0000
Subject: add patch for max_align_t usage
---
diff --git a/0001-osdi-fix-wrong-usage-of-max_align_t.patch
b/0001-osdi-fix-wrong-usage-of-max_align_t.patch
new file mode 100644
index 0000000..e8dc194
--- /dev/null
+++ b/0001-osdi-fix-wrong-usage-of-max_align_t.patch
@@ -0,0 +1,30 @@
+From 410ffa0ec495ff7b7eeac65f7dcb2a5e9e5d4626 Mon Sep 17 00:00:00 2001
+From: ngspice maintainer <ngspice-owner(a)fedoraproject.org>
+Date: Tue, 3 Jan 2023 18:13:07 +0900
+Subject: [PATCH] osdi: fix wrong usage of max_align_t
+
+max_align_t is used to examine the largest alignment requirement,
+and it is expected to check the alignment value via alignof, not sizeof.
+
+Otherwise, __attribute__((aligned)) can complain as required alignment
+being invalid, e.g. on s390x.
+---
+ src/osdi/osdidefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/osdi/osdidefs.h b/src/osdi/osdidefs.h
+index 45d117336..ee57f3a18 100644
+--- a/src/osdi/osdidefs.h
++++ b/src/osdi/osdidefs.h
+@@ -44,7 +44,7 @@ typedef struct {
+ #ifdef _MSC_VER
+ #define MAX_ALIGN 8
+ #else
+-#define MAX_ALIGN sizeof(max_align_t)
++#define MAX_ALIGN alignof(max_align_t)
+ #endif
+
+
+--
+2.39.0
+
diff --git a/ngspice.spec b/ngspice.spec
index 65e41d2..c6ad3af 100644
--- a/ngspice.spec
+++ b/ngspice.spec
@@ -18,7 +18,7 @@
%undefine prever
%global prerpmver %(echo "%{?prever}" | sed -e 's|-||g')
-%global mainrel 1.1
+%global mainrel 1.2
%if 0%{?usegitbare} >= 1
%global gitcommit 4bcd4daf559e70f268b5540bdf6afdf38e458e13
@@ -61,6 +61,7 @@ Source10: create-ngspice-git-bare-tarball.sh
# Link libspice.so with -lBLT or -lBLIlite, depending on whether in tk mode or
# not (bug 1047056, debian bug 737279)
Patch0: ngspice-37-blt-linkage-workaround.patch
+Patch10: 0001-osdi-fix-wrong-usage-of-max_align_t.patch
BuildRequires: make
BuildRequires: gcc
@@ -190,6 +191,7 @@ popd
%patch0 -p2 -b .link
git commit -m "Link libspice.so with -lBLT or -lBLIlite, depending on whether in tk
mode or not" -a
+cat %PATCH10 | git am
# make sure the examples are UTF-8...
for nonUTF8 in \
https://src.fedoraproject.org/rpms/ngspice/c/827fc3c8eef4c6b01cddf97ce2d1...