From patchwork Sat Sep 22 19:43:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 973605 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OgM56sdk"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Hgqs4LVDz9s9G for ; Sun, 23 Sep 2018 05:43:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 620388A60C; Sat, 22 Sep 2018 19:43:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jm+4nymlIlYa; Sat, 22 Sep 2018 19:43:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A0E978A60E; Sat, 22 Sep 2018 19:43:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C3AFD1C2D2B for ; Sat, 22 Sep 2018 19:43:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C01988A2B0 for ; Sat, 22 Sep 2018 19:43:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IZt8WF4VWeeE for ; Sat, 22 Sep 2018 19:43:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3DE2E8A294 for ; Sat, 22 Sep 2018 19:43:15 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id n11-v6so4702989wro.0 for ; Sat, 22 Sep 2018 12:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=pYglbyrQ1Ljyl2BiE0t8hXXOrmfE+U7m3PNmCW6Ls88=; b=OgM56sdkKFbThGpGVxLBWMtQh+mqjxrjMwTWeJ8bpsGUIHNQ0257D8xN7HujLaz+8F LPKHyPbVi6eLXrwXQo1Pj1Vy3qsjWYY/QCFv2HW1ao/MtyoraiMEybUu2qfR4KdDXEW6 1KxP4GogyPZAABeScdIQeu4ZOTpPitt+R7yWzwAxhcgVDCEorrCJirKFT84TzC1Kaj5h WEOLU7FoyWz5+WzyF9ea6j7MRSMfX0+/Jz6G1UStLs0fTsVWW1b1jeqHke/ot+cJ6NWg m/RD9OQYE1+Q79vB40O6N+ynTuSTLoGsoUVcNnYGQv9IkelYCDTaL6Yb9w1lHzsOkeJO aTrg== 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=pYglbyrQ1Ljyl2BiE0t8hXXOrmfE+U7m3PNmCW6Ls88=; b=GUI3MeemOg5TKFrfPMkJK4h/HPtaofnzFGnN/SHhtSllPMWy2cEdtIT+I9USRPZFS5 Sylen3wBUmJAw/XV3PUzfNT4BHLlynecN6H7V76vQX0WmcC7oYSjChRw+9DW5ctzXkdD TIyrpghJboSaxo5BFhrMZkRMwxlepr6tJ6mwofpPGesMMnsUa7RLePhVDnxS2k/9aRI1 M9QvfuUx80FqbioJCLz3I/dWx6ce/dCyu2L81893g0V0hXi9ktosTAabAk07VPAljo1+ Xfah3+LZivD69bSQIchGyXp7nhKS3p7LVzytWk1JdZ9fUSMPD6htxZk3a8b/fVH3OcUU aycA== X-Gm-Message-State: ABuFfoj+o3WknrAh680JqNIqfaNHUfjEb+5A3Hxo/BC0AJKI6cg33KzL +Q81W8ojuwtP7KXNSX80wth26v4M X-Google-Smtp-Source: ACcGV610eL20qGoLg6UfKnWcfdS13gwPCTSzzxr2GPE2e70CvlWnpUsAswDPgqTAllixXNYADiPbwQ== X-Received: by 2002:adf:f8cd:: with SMTP id f13-v6mr2992141wrq.237.1537645393337; Sat, 22 Sep 2018 12:43:13 -0700 (PDT) Received: from localhost.localdomain (ARennes-656-1-284-254.w109-218.abo.wanadoo.fr. [109.218.204.254]) by smtp.gmail.com with ESMTPSA id y205-v6sm9361475wmc.3.2018.09.22.12.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Sep 2018 12:43:12 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 22 Sep 2018 21:43:05 +0200 Message-Id: <20180922194305.27608-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/1] libnfs: fix build of applications like mpd on musl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine , Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Include sys/time.h if __linux__ is defined otherwise applications including libnfs.h (such as mpd) will fail to build on musl: /home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/x86_64-linux-g++ -DHAVE_CONFIG_H -I. -DNDEBUG -I./src -DSYSTEM_CONFIG_FILE_LOCATION='"/etc/mpd.conf"' -I/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/../x86_64-buildroot-linux-musl/sysroot/usr/include -I/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/../x86_64-buildroot-linux-musl/sysroot/usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fvisibility=hidden -fno-threadsafe-statics -fmerge-all-constants -ffast-math -ftree-vectorize -ffunction-sections -fdata-sections -Wall -Wextra -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -Wno-noexcept-type -c -o src/lib/nfs/libstorage_a-Error.o `test -f 'src/lib/nfs/Error.cxx' || echo './'`src/lib/nfs/Error.cxx In file included from src/lib/nfs/Error.cxx:37:0: /home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/x86_64-buildroot-linux-musl/sysroot/usr/include/nfsc/libnfs.h:965:23: error: field 'atime' has incomplete type 'timeval' struct timeval atime; ^~~~~ /home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/x86_64-buildroot-linux-musl/sysroot/usr/include/nfsc/libnfs.h:965:15: note: forward declaration of 'struct timeval' struct timeval atime; Fixes: - http://autobuild.buildroot.org/results/892469e34cb2f7e8fac4a79f8c51ca8e7235aef3 Signed-off-by: Fabrice Fontaine --- ...nally-include-sys-time.h-in-libnfs.h.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/libnfs/0001-conditionally-include-sys-time.h-in-libnfs.h.patch diff --git a/package/libnfs/0001-conditionally-include-sys-time.h-in-libnfs.h.patch b/package/libnfs/0001-conditionally-include-sys-time.h-in-libnfs.h.patch new file mode 100644 index 0000000000..80b4fdca70 --- /dev/null +++ b/package/libnfs/0001-conditionally-include-sys-time.h-in-libnfs.h.patch @@ -0,0 +1,40 @@ +From e2b7bcfbc38336d12dfdd4e36af87be4352a16a9 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 22 Sep 2018 13:27:18 +0200 +Subject: [PATCH] conditionally include sys/time.h in libnfs.h + +Include sys/time.h if __linux__ is defined otherwise applications +including libnfs.h (such as mpd) will fail to build on musl: + +/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/x86_64-linux-g++ -DHAVE_CONFIG_H -I. -DNDEBUG -I./src -DSYSTEM_CONFIG_FILE_LOCATION='"/etc/mpd.conf"' -I/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/../x86_64-buildroot-linux-musl/sysroot/usr/include -I/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/bin/../x86_64-buildroot-linux-musl/sysroot/usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fvisibility=hidden -fno-threadsafe-statics -fmerge-all-constants -ffast-math -ftree-vectorize -ffunction-sections -fdata-sections -Wall -Wextra -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -Wno-noexcept-type -c -o src/lib/nfs/libstorage_a-Error.o `test -f 'src/lib/nfs/Error.cxx' || echo './'`src/lib/nfs/Error.cxx +In file included from src/lib/nfs/Error.cxx:37:0: +/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/x86_64-buildroot-linux-musl/sysroot/usr/include/nfsc/libnfs.h:965:23: error: field 'atime' has incomplete type 'timeval' + struct timeval atime; + ^~~~~ +/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/x86_64-buildroot-linux-musl/sysroot/usr/include/nfsc/libnfs.h:965:15: note: forward declaration of 'struct timeval' + struct timeval atime; + +Fixes: + - http://autobuild.buildroot.org/results/892469e34cb2f7e8fac4a79f8c51ca8e7235aef3 + +Signed-off-by: Fabrice Fontaine +--- + include/nfsc/libnfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h +index 09dcf1c..23dcc98 100755 +--- a/include/nfsc/libnfs.h ++++ b/include/nfsc/libnfs.h +@@ -24,7 +24,7 @@ + #define _LIBNFS_H_ + + #include +-#if defined(__ANDROID__) || defined(AROS) \ ++#if defined(__ANDROID__) || defined(AROS) || defined(__linux__) \ + || ( defined(__APPLE__) && defined(__MACH__) ) + #include + #else +-- +2.17.1 +