* [bug#48788] [PATCH] gnu: libaio: Fix build with newer GCC versions.
@ 2021-06-02 10:01 Jonathan Brielmaier
2021-06-02 10:04 ` Jonathan Brielmaier
2021-07-08 20:57 ` bug#48788: " Jonathan Brielmaier
0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Brielmaier @ 2021-06-02 10:01 UTC (permalink / raw)
To: 48788; +Cc: Jonathan Brielmaier
* gnu/packages/patches/libaio-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/linux.scm (libaio): Use the patch.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 1 +
gnu/packages/patches/libaio-fix-build.patch | 46 +++++++++++++++++++++
3 files changed, 48 insertions(+)
create mode 100644 gnu/packages/patches/libaio-fix-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index d5a832146e..1e8dab8989 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1251,6 +1251,7 @@ dist_patch_DATA = \
%D%/packages/patches/jfsutils-include-systypes.patch \
%D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \
+ %D%/packages/patches/libaio-fix-build.patch \
%D%/packages/patches/libblockdev-glib-compat.patch \
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
%D%/packages/patches/libffi-float128-powerpc64le.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cf020a153b..427335c8d5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4861,6 +4861,7 @@ Linux Device Mapper multipathing driver:
(uri (list
(string-append "https://releases.pagure.org/libaio/"
name "-" version ".tar.gz")))
+ (patches (search-patches "libaio-fix-build.patch"))
(sha256
(base32
"14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b"))))
diff --git a/gnu/packages/patches/libaio-fix-build.patch b/gnu/packages/patches/libaio-fix-build.patch
new file mode 100644
index 0000000000..68b69a5fb2
--- /dev/null
+++ b/gnu/packages/patches/libaio-fix-build.patch
@@ -0,0 +1,46 @@
+From b9e17f6afdc4d0e81b1598aecea7b80d0c54b13a Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem@hadrons.org>
+Date: Jul 29 2019 16:26:10 +0000
+Subject: harness: Use destination strncpy() expression for sizeof() argument
+
+
+Even though this is the same size, as the sizeof() is derived from the
+source expression, recent gcc versions will emit a warning, which is
+turned into an error by -Werror:
+
+ error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression
+ as the source; did you mean to use the size of the destination?
+ [-Werror=sizeof-pointer-memaccess]
+
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
+
+---
+
+diff --git a/harness/cases/19.t b/harness/cases/19.t
+index 4989510..5c3e0d6 100644
+--- a/harness/cases/19.t
++++ b/harness/cases/19.t
+@@ -41,7 +41,7 @@ open_temp_file(void)
+ int fd;
+ char template[sizeof(TEMPLATE)];
+
+- strncpy(template, TEMPLATE, sizeof(TEMPLATE));
++ strncpy(template, TEMPLATE, sizeof(template));
+ fd = mkostemp(template, O_DIRECT);
+ if (fd < 0) {
+ perror("mkstemp");
+diff --git a/harness/cases/21.t b/harness/cases/21.t
+index 441eaa8..fe33a9d 100644
+--- a/harness/cases/21.t
++++ b/harness/cases/21.t
+@@ -43,7 +43,7 @@ open_temp_file()
+ int fd;
+ char temp_file[sizeof(TEMPLATE)];
+
+- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE));
++ strncpy(temp_file, TEMPLATE, sizeof(temp_file));
+ fd = mkstemp(temp_file);
+ if (fd < 0) {
+ perror("mkstemp");
+
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#48788] [PATCH] gnu: libaio: Fix build with newer GCC versions.
2021-06-02 10:01 [bug#48788] [PATCH] gnu: libaio: Fix build with newer GCC versions Jonathan Brielmaier
@ 2021-06-02 10:04 ` Jonathan Brielmaier
2021-07-08 20:57 ` bug#48788: " Jonathan Brielmaier
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Brielmaier @ 2021-06-02 10:04 UTC (permalink / raw)
To: 48788
This should go to core-updates as libaio is failing there due to a newer
GCC version.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#48788: [PATCH] gnu: libaio: Fix build with newer GCC versions.
2021-06-02 10:01 [bug#48788] [PATCH] gnu: libaio: Fix build with newer GCC versions Jonathan Brielmaier
2021-06-02 10:04 ` Jonathan Brielmaier
@ 2021-07-08 20:57 ` Jonathan Brielmaier
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Brielmaier @ 2021-07-08 20:57 UTC (permalink / raw)
To: 48788-done
Not required anymore. libaio builds fine one core-updates now without
this patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-08 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 10:01 [bug#48788] [PATCH] gnu: libaio: Fix build with newer GCC versions Jonathan Brielmaier
2021-06-02 10:04 ` Jonathan Brielmaier
2021-07-08 20:57 ` bug#48788: " Jonathan Brielmaier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).