From patchwork Tue Dec 29 15:35:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 1421217 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=googlegroups.com (client-ip=2a00:1450:4864:20::63d; helo=mail-ej1-x63d.google.com; envelope-from=swupdate+bncbdpppp7kyilbbzuzvx7qkgqe7olcufy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=O+xf4JBP; dkim-atps=neutral Received: from mail-ej1-x63d.google.com (mail-ej1-x63d.google.com [IPv6:2a00:1450:4864:20::63d]) (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 4D4z643NCNz9sW0 for ; Wed, 30 Dec 2020 02:36:10 +1100 (AEDT) Received: by mail-ej1-x63d.google.com with SMTP id h4sf3508725eja.12 for ; Tue, 29 Dec 2020 07:36:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1609256167; cv=pass; d=google.com; s=arc-20160816; b=VtIReayRiCqLxYBe1VTkheOg/RowVjvgAJxLNmbAWssjve3Iu4XS8/Y26B0ryM+7l0 IA7swM+mfWLPFvscEU3Qr1zFLu9u3vPDiB3A2umaa59P1hUJYX864Tux9mRjqIbr+py8 ZTa+EbprWoAz4xg6HjhOXU0tG+q40gF4+VfNcnzl+W2qCXDr1OEJeW/m+e+GFuWrxje2 MnwUn+0SsCop140l+G6wWjN+aAjTPAJgQ925+NHlrc7j242RkkCU6EvNg6gW3XKeXQAS qEws5dDk6s1oHLo5KYcHNJOG8gQDZav+452FegUZTSRXljfPfQxKbtEZ3Dq1RrqS4Wkz kB7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=MkeoStLYWyu4mk4N0LQBa5JpDp32i/Ni08RJTlVZ0dQ=; b=E1uJYdikROC5JCipWpy5EUN00qvvfeirQ7ZEC3ezKemIq6g8SQW0wPlTcLuN5su6iS saXdwA4BIH7eHBokAQ5knogzEcEcoM6uuHoNHT/qRGYfiwpmch4hWAyGkecRn0cIJKwS yejGeaLQJIYNA5zr++PwVmDyU4e2NzPvcJ4wO2reU9RlN7cR0o9kQ4IGY/F0Tei6SgrI sW4V0iumQt9o0/yuM5e1rK3a2xP3Z9iqdNwH9OBzoU4z+DiW+eq+iak5uzvcOEmRqy1z /gMUtgT64tSAyaoJoBz8XtfzYiX2E3u8YlGmyujRVkYxYe+ZwZ89e1+TVpJ+O8Iw09EZ rtKQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=C3ZD7K5F; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=8jURnkjl; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MkeoStLYWyu4mk4N0LQBa5JpDp32i/Ni08RJTlVZ0dQ=; b=O+xf4JBPkpkimOiFMgQZE4ymBhY4gbCKnoAgc1mFnlPd5EoFV/5QpvJdD9JOaCSK0F vETzYyVJcM7KjEt9Nscq95RNqV6PNGw1yVwejLbOvz1AwjZUw8rJPRiY+ZI++3wND9+l sTFbQy41EdIQ0syZ5i/917kHUkb32FhQPvbTMwSIbQtzgvOYMlC/pUGQTQi5cxdMfHgX gHKuSh34/AR+KdmbXq3999CgC5X5ClMvtkq75/N+nrVu7HSvmfJHJif5WJY1WmEZtytl md9ivzP2BcWpg4MZgb+u7/ok40pBwWf0r8NKwUpL+J9hazLueFRO/XyIEusX0K+yove8 Wipw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MkeoStLYWyu4mk4N0LQBa5JpDp32i/Ni08RJTlVZ0dQ=; b=VVHcBU2Uijit1V9RQRFN0mzDi8B/A8hlvLEKWcfR0d7iWwVgyc7D3zc6fc9MpgSAlb i64f2uqSTXx/oilcBr2KdQk8+Bcxf0Z4NezsOlPU1QyazUEDqZglEWI72r5B19ZzqP13 Z5RJ8v7Tlt8UswwblvUkU69fVj4ujG/R1jFYqeORjpN3Qe1RhCOlLkti52VbFhErsZr5 fhWQt+mFTaY6O4zhDtn2pXugmpdUZExstlQ/IhumPUrF0r08dMS+LuxfY2+iCYLhxTvH zht2tJ2hXjIcFEtlRSQY7lOSRXgTGk7h+oyJoPWh8aaSINFVL3+yymAuhTvcnUL/+WtO JPqA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM53094Op2E8IYLe+WyTeVCylKsdw9jOFxGbrKDMMZLsFV2I+WZpWR K2QdHlob8jwxmteyR+4drcg= X-Google-Smtp-Source: ABdhPJwWrv0Q0MHapl+4sa9GgB8hxHRf0y6+ob7LPPKsLlt1Fj52lgKeo2oSYabG2IuzwcqXzfrQ6A== X-Received: by 2002:a17:906:fb1a:: with SMTP id lz26mr45749775ejb.194.1609256166991; Tue, 29 Dec 2020 07:36:06 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:906:5a96:: with SMTP id l22ls18756037ejq.7.gmail; Tue, 29 Dec 2020 07:36:05 -0800 (PST) X-Received: by 2002:a17:906:d101:: with SMTP id b1mr27205594ejz.80.1609256165930; Tue, 29 Dec 2020 07:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609256165; cv=none; d=google.com; s=arc-20160816; b=dg/Jbuw6KxDWZxXpMZpKYK0RZXh+FXAgwuV2xqGi8wFAHuB3yUvQ1RBk7myx+4jZhW ZAkxKA8eeqBuYtJG7q3sDNTwVLq5GvyXM68cPkMtWLYG6Y6//dJYwglHH6fC5d32EK8r kpjBhSjYGEqUC2TV10HN7wESjhWIolIT1hlWg0czlbTH+Bl9FeKwkWpv5UZfPf8BjtqL s4mveZ6WfQK2XgBB9Htq7coUJyuVnOsD6cjhfBAWldzWzpC+tWIDM9UR4jXgIa+Jl0z+ Sl6XyQaXDZda/ftSSUuLVa32u5PhznoSofYlib5BOIyOZ87IqCr+WsyhXS8w1MYMFZNg xXlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=i3DM5xybhlw84s0RPISVPS7vMbp8yx1vKkThYTc6iFo=; b=WthX0kZEcwn+EInj/jhlNEA/olp5qMnxPmcDNze/rYjehSVPhzGIc+Mtd2apNqqC7S mOmfv5AnGo8VC8W2uX/Z7uHW81tggfdfPxB+OfYQuiwm5PtTUcdgk1JaW4Q1T8eIejI5 BPG0pj+mZInpAfiee4UKtWzBtRf2rXIuyFns2c4IiA8VDdvjEALXV+jQ6zrC0ngDcim/ 6h7bJaJZNUGwhtyRvN5QZbABAoijTQ8IlkDTBdRcCi1wY6D1ivYgql4TyTCAqXcKX5iI Y9aj6tZM9pkebCKyT46mxySoNTACYyPuyPB6nSOoax2YSgXQzLOypcHNCuLSRGGvIynZ fqOA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=C3ZD7K5F; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=8jURnkjl; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from galois.linutronix.de (Galois.linutronix.de. [2a0a:51c0:0:12e:550::1]) by gmr-mx.google.com with ESMTPS id i6si1072996edk.4.2020.12.29.07.36.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 07:36:05 -0800 (PST) Received-SPF: pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) client-ip=2a0a:51c0:0:12e:550::1; From: bage@linutronix.de To: swupdate@googlegroups.com Cc: Bastian Germann Subject: [swupdate] [PATCH 3/3] Build with libbsd for strlcpy Date: Tue, 29 Dec 2020 16:35:56 +0100 Message-Id: <20201229153556.22996-4-bage@linutronix.de> In-Reply-To: <20201229153556.22996-1-bage@linutronix.de> References: <20201229153556.22996-1-bage@linutronix.de> MIME-Version: 1.0 X-Original-Sender: bage@linutronix.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=C3ZD7K5F; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=8jURnkjl; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , From: Bastian Germann The previously included strlcpy implementation can conflict with libbsd if REMOTE_HANDLER is enabled and zeromq is built with libbsd. On Linux, build with libbsd to get rid of that error: handlers/built-in.o: undefined reference to symbol 'strlcpy@@LIBBSD_0.0' Link: https://salsa.debian.org/debian/swupdate/-/jobs/1288597 Signed-off-by: Bastian Germann --- Makefile.flags | 3 +++ doc/source/swupdate.rst | 1 + include/util.h | 1 + 3 files changed, 5 insertions(+) diff --git a/Makefile.flags b/Makefile.flags index 7003af1..783cb89 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -101,6 +101,9 @@ KBUILD_CFLAGS += --sysroot=$(CONFIG_SYSROOT) export SYSROOT=$(CONFIG_SYSROOT) endif +ifeq ($(HAVE_LINUX),y) +LDLIBS += bsd +endif # Links always pthread LDLIBS += pthread # lua diff --git a/doc/source/swupdate.rst b/doc/source/swupdate.rst index a8144d1..ede3b10 100644 --- a/doc/source/swupdate.rst +++ b/doc/source/swupdate.rst @@ -210,6 +210,7 @@ There are only a few libraries that are required to compile SWUpdate. - openssl / wolfssl / mbedtls (optional) for cryptographic operations - p11-kit & wolfssl (optional) for PKCS#11 support - Lua: liblua and the development headers. +- libbsd is linked on Linux. - libz is always linked. - libconfig (optional) for the default parser - libarchive (optional) for archive handler diff --git a/include/util.h b/include/util.h index e5a8955..d6df2b8 100644 --- a/include/util.h +++ b/include/util.h @@ -13,6 +13,7 @@ #include #include #if defined(__linux__) +#include #include #endif #include "swupdate.h"