From nobody Sun May 5 13:53:10 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.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496415958655570.8682200757971; Fri, 2 Jun 2017 08:05:58 -0700 (PDT) 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 14B537F7AD; Fri, 2 Jun 2017 15:05:55 +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 8F3EF91032; Fri, 2 Jun 2017 15:05:54 +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 1BCE24A48C; Fri, 2 Jun 2017 15:05:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v52F4fQH002086 for ; Fri, 2 Jun 2017 11:04:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1CF3C71C24; Fri, 2 Jun 2017 15:04:41 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14BA871C30 for ; Fri, 2 Jun 2017 15:04:39 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B06EB4E884 for ; Fri, 2 Jun 2017 15:04:31 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id h4so6948159lfj.3 for ; Fri, 02 Jun 2017 08:04:31 -0700 (PDT) Received: from localhost.localdomain ([213.147.221.70]) by smtp.gmail.com with ESMTPSA id h17sm5044722lfg.47.2017.06.02.08.04.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 08:04:28 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 14B537F7AD Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 14B537F7AD Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s7Y8dqxl" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B06EB4E884 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bogorodskiy@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B06EB4E884 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=885ALw0T8dZSaq78Y5UVeXOa7vuaW7X4jeNjrNwrR9U=; b=s7Y8dqxlsSYuEt6V/f5s7Wk4O8+11ckq36Aqvh+izTdzqGAjKNc6azKVenbmjoXGi/ gkDPfNvOfu4fN4kYEmrBU4Yok7lnRrTtsTAID6OYVmqq3l66Jp5yjnzjO/wSc8EJsx9v ak5RPuIxT8WUb4/D2mfO82k6vhH2LUQqIQmanLksSn/gbrDv4iN1OlLdqoER3hM0Owsn vOrF9TouzRkaScZzOh2mA+0Ld+8+WV8vnnUnE8KDdAI3X9hrFcKCNB5hEp/pGHd9RkLt PoZ7S7RHNT47KDkTkmrUW3AtEUBkI+z4fxA0LU60nbvOwqtI+KbAYNFzUzTRDc83PeXI jTxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=885ALw0T8dZSaq78Y5UVeXOa7vuaW7X4jeNjrNwrR9U=; b=VXwHi7xSmHFvEZdNdgmCmaAapykATX8ZgfUshxYSF81UC03qGsFl6Mcc/P4uqgtuOC P9NWsPExxmD9HR9exCSMfe/HLxszb/hgo/TBTnfp72Ln85x2rCP87JzSm2uIvCRkeiRA +g4Wuusm4t42XpkwFzOM1J7e60BrTMkndVv+knPa2D596TsctYLVZ5yS5oAeRGcmf/IY yjBfb+fecvkYN1rWd/CmYFs1w6qn38IwD4c70xCSVXryBJmSmFBHWwNdV0YXyWmBpxEg IzmfCXRZZgrAeyQmNEZ5frf2Im/+sMVqC7r46JAC7mBd0zxegy3MKYMh4idSh+tfyruX WDpA== X-Gm-Message-State: AODbwcBfkgy/VFXP4aQ4Lq73fqDSJAb/4mMf0JF38sloByUvHXd988Pc ar+mmP97HBl+dTgf X-Received: by 10.25.203.84 with SMTP id b81mr2438274lfg.86.1496415869713; Fri, 02 Jun 2017 08:04:29 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 2 Jun 2017 19:04:23 +0400 Message-Id: <20170602150423.59568-1-bogorodskiy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 02 Jun 2017 15:04:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 02 Jun 2017 15:04:32 +0000 (UTC) for IP:'209.85.215.66' DOMAIN:'mail-lf0-f66.google.com' HELO:'mail-lf0-f66.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.215.66 mail-lf0-f66.google.com 209.85.215.66 mail-lf0-f66.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH v2] virsh: workaround readline prototypes warnings 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: , MIME-Version: 1.0 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.28]); Fri, 02 Jun 2017 15:05:55 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When building with clang 4.0.0, virsh build fails like this: gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools' CC virsh-virsh.o In file included from virsh.c:45: In file included from /usr/local/include/readline/readline.h:31: /usr/local/include/readline/rltypedefs.h:35:22: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef int Function () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:36:24: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef void VFunction () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:37:26: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef char *CPFunction () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:38:28: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef char **CPPFunction () __attribute__ ((deprecated)); ^ void In file included from virsh.c:45: /usr/local/include/readline/readline.h:385:23: error: this function declara= tion is not a prototype [-Werror,-Wstrict-prototypes] extern int rl_message (); ^ void 5 errors generated. gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1 Fix that by adding -D_FUNCTION_DEF to READLINE_CFLAGS to fix *Function related warnings and add a check for stdarg.h so readline headers use proper rl_message declaration. Bug report on the readline mailing list: http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html --- configure.ac | 2 +- m4/virt-readline.m4 | 4 +++- tools/Makefile.am | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 1af5538ee..1a73b3466 100644 --- a/configure.ac +++ b/configure.ac @@ -328,7 +328,7 @@ dnl Availability of various common headers (non-fatal i= f missing). AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \ sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \ sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \ - libtasn1.h sys/ucred.h sys/mount.h]) + libtasn1.h sys/ucred.h sys/mount.h stdarg.h]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include ]]) AC_CHECK_FUNCS([stat stat64 __xstat __xstat64 lstat lstat64 __lxstat __lxs= tat64]) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index ee70ea36b..9fba5148a 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -45,7 +45,9 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ # function, to ensure we aren't being confused by caching. LIBS=3D$lv_saved_libs AC_CHECK_LIB([readline], [rl_initialize], - [], [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) + [READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" + AC_SUBST(READLINE_CFLAGS)], + [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) LIBS=3D$lv_saved_libs ]) =20 diff --git a/tools/Makefile.am b/tools/Makefile.am index 56691c289..345521457 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -244,7 +244,8 @@ virsh_CFLAGS =3D \ $(WARN_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBXML_CFLAGS) + $(LIBXML_CFLAGS) \ + $(READLINE_CFLAGS) =20 virt_admin_SOURCES =3D \ virt-admin.c virt-admin.h \ --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list