From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Li Qiang" <liq3ea@163.com>,
groug@kaod.org, clg@kaod.org, mst@redhat.com
Subject: [Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode
Date: Thu, 17 Jan 2019 14:38:11 +0100 [thread overview]
Message-ID: <1547732292-14021-3-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1547732292-14021-1-git-send-email-thuth@redhat.com>
The header "scsi-lowlevel.h" of libiscsi 1.9.0 contains some bad
"inline" prototype definitions which GCC refuses to compile in its
gnu99 mode:
In file included from block/iscsi.c:52:0:
/usr/include/iscsi/scsi-lowlevel.h:810:13: error: inline function
‘scsi_set_uint16’ declared but never defined [-Werror]
inline void scsi_set_uint16(unsigned char *c, uint16_t val);
^
/usr/include/iscsi/scsi-lowlevel.h:809:13: error: inline function
‘scsi_set_uint32’ declared but never defined [-Werror]
inline void scsi_set_uint32(unsigned char *c, uint32_t val);
^
[...]
This has been fixed by upstream libiscsi in version 1.10.0 (see
https://github.com/sahlberg/libiscsi/commit/7692027d6c11 ), but
since we still want to support 1.9.0 for CentOS 7 / RHEL7, we
have to work-around the issue by redefining the "inline" keyword
to use the old "gnu89" mode behavior via "gnu_inline" instead.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
block/iscsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index a7e8c1f..ff47320 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -49,7 +49,9 @@
/* Conflict between scsi/utils.h and libiscsi! :( */
#define SCSI_XFER_NONE ISCSI_XFER_NONE
#include <iscsi/iscsi.h>
+#define inline __attribute__((gnu_inline)) /* required for libiscsi v1.9.0 */
#include <iscsi/scsi-lowlevel.h>
+#undef inline
#undef SCSI_XFER_NONE
QEMU_BUILD_BUG_ON((int)SCSI_XFER_NONE != (int)ISCSI_XFER_NONE);
--
1.8.3.1
next prev parent reply other threads:[~2019-01-17 13:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
2019-01-17 13:38 ` [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode Thomas Huth
2019-01-17 13:38 ` Thomas Huth [this message]
2019-01-17 13:38 ` [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug " Thomas Huth
2019-02-12 10:35 ` Eduardo Otubo
2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
2019-01-18 13:15 ` Philippe Mathieu-Daudé
2019-01-18 13:23 ` Philippe Mathieu-Daudé
2019-01-18 14:20 ` Peter Maydell
2019-01-18 18:26 ` Philippe Mathieu-Daudé
2019-01-18 18:31 ` Peter Maydell
2019-01-21 14:43 ` Peter Maydell
2019-01-21 17:42 ` Philippe Mathieu-Daudé
2019-01-21 18:59 ` Philippe Mathieu-Daudé
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=1547732292-14021-3-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=clg@kaod.org \
--cc=f4bug@amsat.org \
--cc=groug@kaod.org \
--cc=liq3ea@163.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).