From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/fio/, sys-block/fio/files/
Date: Mon, 11 Nov 2019 19:55:01 +0000 (UTC) [thread overview]
Message-ID: <1573502043.a61a2972fba62810cf6ba82e3e747e303d171149.slyfox@gentoo> (raw)
commit: a61a2972fba62810cf6ba82e3e747e303d171149
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 11 19:54:03 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Nov 11 19:54:03 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a61a2972
sys-block/fio: fix USE=gtk build failure, bug #699878
With USE=gtk build failed as:
```
gclient.c:333:2: error: too many arguments to function 'strncpy'
333 | strncpy(message, sizeof(message), "%s", status_message);
| ^~~~~~~
```
Picked upstream fix as-is.
Reported-by: Rafal Kupiec
Closes: https://bugs.gentoo.org/699878
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
sys-block/fio/files/fio-3.16-snprintf.patch | 44 +++++++++++++++++++++++++++++
sys-block/fio/fio-3.16.ebuild | 1 +
2 files changed, 45 insertions(+)
diff --git a/sys-block/fio/files/fio-3.16-snprintf.patch b/sys-block/fio/files/fio-3.16-snprintf.patch
new file mode 100644
index 00000000000..1470290f3cb
--- /dev/null
+++ b/sys-block/fio/files/fio-3.16-snprintf.patch
@@ -0,0 +1,44 @@
+From 5b215853ed4b438b5b2d4ac3e56d5f0d19e145d9 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Mon, 23 Sep 2019 14:12:12 -0700
+Subject: [PATCH] Fix compilation error with gfio
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 36833fb04 replaced many usages of strncpy with snprintf.
+But there is one place where new arguments were added but the function
+name has not been changed. It leads to the following compilation error:
+
+gclient.c:333:2: error: too many arguments to function ‘strncpy’
+ 333 | strncpy(message, sizeof(message), "%s", status_message);
+ | ^~~~~~~
+In file included from /usr/include/features.h:450,
+ from /usr/include/bits/libc-header-start.h:33,
+ from /usr/include/stdlib.h:25,
+ from gclient.c:1:
+/usr/include/bits/string_fortified.h:103:1: note: declared here
+ 103 | __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
+ | ^~~~~
+
+Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+---
+ gclient.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gclient.c b/gclient.c
+index 64324177..d8dc62d2 100644
+--- a/gclient.c
++++ b/gclient.c
+@@ -330,7 +330,7 @@ static void gfio_update_thread_status_all(struct gui *ui, char *status_message,
+ static char message[100];
+ const char *m = message;
+
+- strncpy(message, sizeof(message), "%s", status_message);
++ snprintf(message, sizeof(message), "%s", status_message);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ui->thread_status_pb), m);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ui->thread_status_pb), perc / 100.0);
+ gtk_widget_queue_draw(ui->window);
+--
+2.24.0
+
diff --git a/sys-block/fio/fio-3.16.ebuild b/sys-block/fio/fio-3.16.ebuild
index 9547b89e0b7..440fa1282c4 100644
--- a/sys-block/fio/fio-3.16.ebuild
+++ b/sys-block/fio/fio-3.16.ebuild
@@ -55,6 +55,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/fio-2.2.13-libmtd.patch
+ "${FILESDIR}"/fio-3.16-snprintf.patch
)
python_check_deps() {
next reply other threads:[~2019-11-11 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 19:55 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-09-05 5:48 [gentoo-commits] repo/gentoo:master commit in: sys-block/fio/, sys-block/fio/files/ Sam James
2021-01-01 2:03 Michał Górny
2020-09-19 12:29 Michał Górny
2020-01-24 18:36 Mike Frysinger
2017-03-01 5:41 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1573502043.a61a2972fba62810cf6ba82e3e747e303d171149.slyfox@gentoo \
--to=slyfox@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox