From nobody Mon Apr 29 00:08:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520272622071676.2263048511837; Mon, 5 Mar 2018 09:57:02 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A34CBC04AC54; Mon, 5 Mar 2018 17:57:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7814460C7B; Mon, 5 Mar 2018 17:57:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3B5444A46D; Mon, 5 Mar 2018 17:57:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w25HuwFH023519 for ; Mon, 5 Mar 2018 12:56:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id A1BF92144B22; Mon, 5 Mar 2018 17:56:58 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 329712144B20; Mon, 5 Mar 2018 17:56:58 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 5 Mar 2018 17:56:56 +0000 Message-Id: <20180305175656.29138-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] gnulib: temporary hacks to deal with glibc libio.h removal X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 05 Mar 2018 17:57:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 GLibc deprecated libio.h in 2.27 and has removed it in current code that will become 2.28. The latter is now in Fedora rawhide and this change breaks gnulib which mistakenly still relies on these ancient symbols. Add a local hack for gnulib until a proper fix is available upstream. Signed-off-by: Daniel P. Berrang=C3=A9 --- Pushed as a CI build fix gnulib/local/lib/fflush.c.diff | 33 +++++++++++++++++++++++++++++++++ gnulib/local/lib/fpurge.c.diff | 13 +++++++++++++ gnulib/local/lib/freading.c.diff | 13 +++++++++++++ gnulib/local/lib/fseeko.c.diff | 22 ++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 gnulib/local/lib/fflush.c.diff create mode 100644 gnulib/local/lib/fpurge.c.diff create mode 100644 gnulib/local/lib/freading.c.diff create mode 100644 gnulib/local/lib/fseeko.c.diff diff --git a/gnulib/local/lib/fflush.c.diff b/gnulib/local/lib/fflush.c.diff new file mode 100644 index 0000000000..fa0e2431bd --- /dev/null +++ b/gnulib/local/lib/fflush.c.diff @@ -0,0 +1,33 @@ +diff --git a/lib/fflush.c b/lib/fflush.c +index 983ade0ff..5f617305a 100644 +--- a/lib/fflush.c ++++ b/lib/fflush.c +@@ -32,8 +32,8 @@ +=20 + #undef fflush +=20 +- +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#define _IO_IN_BACKUP 0x100 ++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku,= Linux libc5 */ +=20 + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).= */ + static void +@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) +=20 + #endif +=20 +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, = BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Hai= ku, Linux libc5 */) +=20 + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) = && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Androi= d */ +@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) + if (stream =3D=3D NULL || ! freading (stream)) + return fflush (stream); +=20 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku,= Linux libc5 */ +=20 + clear_ungetc_buffer_preserving_position (stream); +=20 diff --git a/gnulib/local/lib/fpurge.c.diff b/gnulib/local/lib/fpurge.c.diff new file mode 100644 index 0000000000..1fd87d8bfa --- /dev/null +++ b/gnulib/local/lib/fpurge.c.diff @@ -0,0 +1,13 @@ +diff --git a/lib/fpurge.c b/lib/fpurge.c +index b1d417c7a..75cf34ca2 100644 +--- a/lib/fpurge.c ++++ b/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, Be= OS, Haiku, Linux libc5 */ ++# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku= , Linux libc5 */ + fp->_IO_read_end =3D fp->_IO_read_ptr; + fp->_IO_write_ptr =3D fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ diff --git a/gnulib/local/lib/freading.c.diff b/gnulib/local/lib/freading.c= .diff new file mode 100644 index 0000000000..c51e34dd6a --- /dev/null +++ b/gnulib/local/lib/freading.c.diff @@ -0,0 +1,13 @@ +diff --git a/lib/freading.c b/lib/freading.c +index 73c28acdd..b1c397016 100644 +--- a/lib/freading.c ++++ b/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, Be= OS, Haiku, Linux libc5 */ ++# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku= , Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) !=3D 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) =3D= =3D 0 + && fp->_IO_read_base !=3D NULL)); diff --git a/gnulib/local/lib/fseeko.c.diff b/gnulib/local/lib/fseeko.c.diff new file mode 100644 index 0000000000..b2c061fc97 --- /dev/null +++ b/gnulib/local/lib/fseeko.c.diff @@ -0,0 +1,22 @@ +diff --git a/lib/fseeko.c b/lib/fseeko.c +index 0101ab55f..542241bb2 100644 +--- a/lib/fseeko.c ++++ b/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) + #endif +=20 + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku,= Linux libc5 */ + if (fp->_IO_read_end =3D=3D fp->_IO_read_ptr + && fp->_IO_write_ptr =3D=3D fp->_IO_write_base + && fp->_IO_save_base =3D=3D NULL) +@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) + return -1; + } +=20 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku,= Linux libc5 */ + fp->_flags &=3D ~_IO_EOF_SEEN; + fp->_offset =3D pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list