From nobody Wed Oct 29 21:56:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1761209904; cv=none; d=zohomail.com; s=zohoarc; b=gyYwnlZpPlGPhBke/sdwRWY3l4WGko3yZduYDQtRrlNNbZlXZ3VPy+BVyNrqVQ2SiCQWdOKSBThkUL3K4EW6l4GVQDJ3hkSaSD/AXuBQ599D/BPmTXZtx7JniCj9KhtUUcJlCgs42k5ZaWZ5DbNUwk8vG4LkD5RTfDI6jx0wNjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761209904; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=c6SRPqKmsyIJlIAnbiHatjWvff6Yy0MFaosq/o6UgTY=; b=TbHk+znt1lmcvI1kA06XsVpqt2ISMP1KndAY5S4loPT9skesDRz3neBBZgywZbw4d2KM/Bha2cbxG7TOqxCYNKf+VCOhx3YwsafLit24swrLVw8LGsK1mA1aqcRHHOzJ5v1c498tlCCeT9B2fHqApFOcSvBqZV13JYx7Vyl60II= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1761209904649137.09724967904162; Thu, 23 Oct 2025 01:58:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1148810.1480645 (Exim 4.92) (envelope-from ) id 1vBr99-0000K1-Ra; Thu, 23 Oct 2025 08:58:11 +0000 Received: by outflank-mailman (output) from mailman id 1148810.1480645; Thu, 23 Oct 2025 08:58:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vBr99-0000Ju-P2; Thu, 23 Oct 2025 08:58:11 +0000 Received: by outflank-mailman (input) for mailman id 1148810; Thu, 23 Oct 2025 08:58:09 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vBr97-0000Jo-LV for xen-devel@lists.xenproject.org; Thu, 23 Oct 2025 08:58:09 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1vBr97-00Fo4G-0Q; Thu, 23 Oct 2025 08:58:09 +0000 Received: from [2a01:cb15:80df:da00:94d0:641e:16e6:ca4b] (helo=l14.home) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vBr96-00B5aB-31; Thu, 23 Oct 2025 08:58:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From; bh=c6SRPqKmsyIJlIAnbiHatjWvff6Yy0MFaosq/o6UgTY=; b=u/X3GriWrix9yN9JCOkT7cige3 WIYbzGW40cHgnDr2cxi4lhBig2wQp381SzcAzhRdumZKSVSdsABGqj/Zg6t/exmiJwI8C9Oms4WDC u9B+rTs2Qun1ojVhM2sNEKbu1Srfzz8Oa4mUn5p3bWx4Nxx6OJJxr0sARW/tQRDv8/qM=; From: Anthony PERARD To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Oleksii Kurochko , Anthony PERARD Subject: [XEN PATCH for-4.21] tools: require at least json-c 0.15 Date: Thu, 23 Oct 2025 10:57:30 +0200 Message-ID: <20251023085730.36628-1-anthony@xenproject.org> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) X-ZM-MESSAGEID: 1761209907026154100 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD If not available, fallback to using YAJL. The code is using json_c_visit() which was introduced in 0.13. json_object_new_null() and json_object_new_uint64() where added to 0.14. And the last one json_object_new_array_ext() was introduced in 0.15. Signed-off-by: Anthony PERARD Acked-by: Andrew Cooper Reviewed-by: Jason Andryuk --- tools/configure | 16 ++++++++-------- tools/configure.ac | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/configure b/tools/configure index 0eb7a0ab6a..d460f25529 100755 --- a/tools/configure +++ b/tools/configure @@ -9642,12 +9642,12 @@ if test -n "$libjsonc_CFLAGS"; then pkg_cv_libjsonc_CFLAGS=3D"$libjsonc_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists = --print-errors \"json-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists = --print-errors \"json-c >=3D 0.15\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c >=3D 0.15") 2>&5 ac_status=3D$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 test $ac_status =3D 0; }; then - pkg_cv_libjsonc_CFLAGS=3D`$PKG_CONFIG --cflags "json-c" 2>/dev/null` + pkg_cv_libjsonc_CFLAGS=3D`$PKG_CONFIG --cflags "json-c >=3D 0.15" 2>/dev= /null` test "x$?" !=3D "x0" && pkg_failed=3Dyes else pkg_failed=3Dyes @@ -9659,12 +9659,12 @@ if test -n "$libjsonc_LIBS"; then pkg_cv_libjsonc_LIBS=3D"$libjsonc_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists = --print-errors \"json-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists = --print-errors \"json-c >=3D 0.15\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c >=3D 0.15") 2>&5 ac_status=3D$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 test $ac_status =3D 0; }; then - pkg_cv_libjsonc_LIBS=3D`$PKG_CONFIG --libs "json-c" 2>/dev/null` + pkg_cv_libjsonc_LIBS=3D`$PKG_CONFIG --libs "json-c >=3D 0.15" 2>/dev/nul= l` test "x$?" !=3D "x0" && pkg_failed=3Dyes else pkg_failed=3Dyes @@ -9685,9 +9685,9 @@ else _pkg_short_errors_supported=3Dno fi if test $_pkg_short_errors_supported =3D yes; then - libjsonc_PKG_ERRORS=3D`$PKG_CONFIG --short-errors --print-errors = --cflags --libs "json-c" 2>&1` + libjsonc_PKG_ERRORS=3D`$PKG_CONFIG --short-errors --print-errors = --cflags --libs "json-c >=3D 0.15" 2>&1` else - libjsonc_PKG_ERRORS=3D`$PKG_CONFIG --print-errors --cflags --libs= "json-c" 2>&1` + libjsonc_PKG_ERRORS=3D`$PKG_CONFIG --print-errors --cflags --libs= "json-c >=3D 0.15" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libjsonc_PKG_ERRORS" >&5 diff --git a/tools/configure.ac b/tools/configure.ac index 7267d02a04..285b4ea128 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -424,7 +424,7 @@ AC_SUBST([ZLIB_CFLAGS]) AC_SUBST([ZLIB_LIBS]) AX_CHECK_EXTFS AX_CHECK_PTHREAD -PKG_CHECK_MODULES([libjsonc], [json-c], +PKG_CHECK_MODULES([libjsonc], [json-c >=3D 0.15], [AC_DEFINE([HAVE_LIBJSONC], [1], [Use library json-c])], [AC_CHECK_LIB([yajl], [yajl_alloc], [AC_SUBST([YAJL_LIBS],[-lyajl]) --=20 Anthony PERARD