From patchwork Fri Dec 25 01:11:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1420566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=inJp67a8; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DlCJ1gUi; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D288n3pyLz9sVt for ; Fri, 25 Dec 2020 12:13:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=iY7/cJwuEy/ThUOwC0R2Rj6PuO1uv8xxTTiNOBhZ9hQ=; b=inJp67a8IqVSUmgGhTrz5eHIEz im6bAysRc5MuQDxvJxQxL9/FC4lwTeBGz44I64Gwf93yGSxievr3guyVz7ov/0MHaKlfBCsPTrbCT iTDCSWzkvzPPtPExN+sRpD5Is+KVyFvC+VoscsAYKZl9U9HrMB8BcNQvbw/MV6uYGAxsndSmhZJFz 3NXNFjUF8mBdwi09dQCxGOhHr+kCZ6jKoAOiAC/Wpb3DKFdg5kC6VBKRlLgcl5e6O3S/jZx7K/DHx gnKFN6omrbWdjkgM9GMiUh9zfOqNSJkIiHBPYREvPBy/eJWGvhuzM/Y+jfVDFxlRUwUagioc4FnZa /T+ScCtA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ksbeK-0007GQ-9Y; Fri, 25 Dec 2020 01:12:08 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ksbeH-0007Fy-Jl for openwrt-devel@lists.openwrt.org; Fri, 25 Dec 2020 01:12:06 +0000 Received: by mail-pg1-x536.google.com with SMTP id n7so2430191pgg.2 for ; Thu, 24 Dec 2020 17:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WRrAjL3woucGv5HNsssJSVNDF81teLk6yTwMBRyccPw=; b=DlCJ1gUigrsr+17NmwTwg7NI4H3ufDVcWnvab947vDBF2PfVBOX2eN7M+JcyAVBCgr gzmo7zXoWiTb2ZmqSUN8ifoAg1mKPbfVsb07CWSdOFtHSh5uLU+M4xIwqiBNdr9DRh/C P/5d42xxgCSJ0vho2kYbN1KVt629EGpLMPjlFLQarbTdLhIra5tQhLuj8vNp0WGAOxBr XmxH9to7+CZ+/21T+VcvRGhWKikXuaZ/wygkYLQ6ZBhfRVpgAe1nfT01yYcQW1vQoSOh U/Aj5NkmU8/OAo9ycdv8wFF+t1Vt5u3NwTRG05bS+drX8hSimaH64pHdyHPg7nbAELIE WKOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WRrAjL3woucGv5HNsssJSVNDF81teLk6yTwMBRyccPw=; b=izrb0N8EVNuILmBykXnf/n22PK6MNMFv1E8qSQ+EOQ0nwgcUeOHFN4nDB/n83T8uEk BR/gAkMz/zf+DUEt1bTOmD3ppjJhwSvE2frxgv0faEKnFTpL4PKvf3FO3xeWTt1VPA6a 5PGd1tcY2EtPBA82a1Cj6U8n/CZJ2TDF4vT5lIuMOX1WbmTc7jGUcK2V8KVEGM6tw4U0 I6LOrIMxLffGPgL1ObpxzviofaomzMHoYqbdMVgz0sjpb84URBPG7wOeQgUUqKeCc7eH 1ldMQUqApdf+9Cc2UhlM38BHsJH+zFTHhC/OHVtVJOvgsicvR8oMpf2hILwmpMdDDuPO Azbg== X-Gm-Message-State: AOAM5326vdhw/j3X3JEse/8LQD8k73P2v0OzatoKo/nYaZEoKKghQmax ySdm0up1sTDcNnLZRfh3ViS5/hFzVxzdgA== X-Google-Smtp-Source: ABdhPJzLtEeLbrqooiomUbBkd0Mx2qE3ksRsE0dSCDwowAhtQcVpsSM03Imnl7zxOL7jaHg4CXzzsg== X-Received: by 2002:aa7:96d8:0:b029:19e:bc79:cf7 with SMTP id h24-20020aa796d80000b029019ebc790cf7mr5404923pfq.22.1608858720521; Thu, 24 Dec 2020 17:12:00 -0800 (PST) Received: from mangix-trapnet.lan ([2001:470:1f05:79e::a89]) by smtp.gmail.com with ESMTPSA id b11sm27679070pfr.38.2020.12.24.17.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Dec 2020 17:11:59 -0800 (PST) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH] libubox: remove support for jsoncpp Date: Thu, 24 Dec 2020 17:11:58 -0800 Message-Id: <20201225011158.35592-1-rosenp@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201224_201205_717408_F851537D X-CRM114-Status: GOOD ( 11.65 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:536 listed in] [list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org jsoncpp requires a C++ compiler instead of a C one. Fixes the following build error: fatal error: cstddef: No such file or directory '#include Issue was discovered on the buildbots where an SDK contained a broken pkgconf. Make json-c required in order to not even attempt compilation when json-c is missing. Signed-off-by: Rosen Penev --- CMakeLists.txt | 7 ++----- blobmsg_json.c | 6 +----- jshn.c | 6 +----- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a1b7d5..34a98bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,11 +15,8 @@ OPTION(BUILD_LUA "build Lua plugin" ON) OPTION(BUILD_EXAMPLES "build examples" ON) INCLUDE(FindPkgConfig) -PKG_SEARCH_MODULE(JSONC json-c) -IF(JSONC_FOUND) - ADD_DEFINITIONS(-DJSONC) - INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) -ENDIF() +PKG_SEARCH_MODULE(JSONC json-c REQUIRED) +INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c ulog.c base64.c) diff --git a/blobmsg_json.c b/blobmsg_json.c index dce81e9..35bdc21 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -17,11 +17,7 @@ #include "blobmsg.h" #include "blobmsg_json.h" -#ifdef JSONC - #include -#else - #include -#endif +#include bool blobmsg_add_object(struct blob_buf *b, json_object *obj) { diff --git a/jshn.c b/jshn.c index 1b685e5..061fc7f 100644 --- a/jshn.c +++ b/jshn.c @@ -13,11 +13,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef JSONC - #include -#else - #include -#endif +#include #include #include