[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode |
Date: |
Mon, 14 Jan 2019 13:52:01 +0000 |
On Mon, 14 Jan 2019 at 13:47, Thomas Huth <address@hidden> wrote:
>
> 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 compiling with "-fgnu89-inline"
> in this case instead.
>
> Suggested-by: Daniel P. Berrangé <address@hidden>
> Signed-off-by: Thomas Huth <address@hidden>
> ---
> configure | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/configure b/configure
> index 2b9ba7d..aa80c17 100755
> --- a/configure
> +++ b/configure
> @@ -4562,6 +4562,11 @@ if test "$libiscsi" != "no" ; then
> libiscsi="yes"
> libiscsi_cflags=$($pkg_config --cflags libiscsi)
> libiscsi_libs=$($pkg_config --libs libiscsi)
> + if $pkg_config --exact-version==1.9.0 libiscsi; then
> + # There are some bad inline declarations in scsi-lowlevel.h of
> + # libiscsi 1.9.0 which don't work in gnu99 mode without this:
> + libiscsi_cflags="-fgnu89-inline $libiscsi_cflags"
> + fi
Can we suppress the warnings with #pragma instead ?
That would avoid compiling the .o file with different
C semantics.
thanks
-- PMM
- [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Daniel P . Berrangé, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Eric Blake, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Eric Blake, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Thomas Huth, 2019/01/14
- Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Daniel P . Berrangé, 2019/01/14
Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode, Philippe Mathieu-Daudé, 2019/01/14