From patchwork Tue Nov 14 11:37:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 837818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybmCJ3YR2z9s7g for ; Tue, 14 Nov 2017 22:54:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 28EB687539; Tue, 14 Nov 2017 11:54:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uk9tfDI-imi8; Tue, 14 Nov 2017 11:54:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id DC91087358; Tue, 14 Nov 2017 11:54:42 +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 C6AA91C01A7 for ; Tue, 14 Nov 2017 11:38:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C0CE08805C for ; Tue, 14 Nov 2017 11:38:17 +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 QJeBM1HBMwf1 for ; Tue, 14 Nov 2017 11:38:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id AFA8286BE1 for ; Tue, 14 Nov 2017 11:38:15 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 13AD5440478; Tue, 14 Nov 2017 13:38:13 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Tue, 14 Nov 2017 13:37:54 +0200 Message-Id: <464b10815ee2e59be56aef7c79d5569ecde913f5.1510659474.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.15.0 Subject: [Buildroot] [PATCH] chrony: fix build with 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: Nathan Lynch MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The SCM_TIMESTAMPING_PKTINFO macro is missing from the socket.h header that musl libc provides as of version 1.1.16 that we currently use in Buildroot. Patch the code to add this macro locally until we update musl. Fixes: http://autobuild.buildroot.net/results/aab/aab3210d6d0c60fb07415d9bbdb09f2d4091446c/ http://autobuild.buildroot.net/results/fc8/fc8440db025f51c176240ca127bc68a367add21c/ Cc: Nathan Lynch Signed-off-by: Baruch Siach --- .../chrony/0001-ntp-fix-build-with-musl-libc.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/chrony/0001-ntp-fix-build-with-musl-libc.patch diff --git a/package/chrony/0001-ntp-fix-build-with-musl-libc.patch b/package/chrony/0001-ntp-fix-build-with-musl-libc.patch new file mode 100644 index 000000000000..c927b343f754 --- /dev/null +++ b/package/chrony/0001-ntp-fix-build-with-musl-libc.patch @@ -0,0 +1,39 @@ +From 1e64bc4c4379ae3e55be3c518e0e3e22c8c4ae77 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 14 Nov 2017 13:23:57 +0200 +Subject: [PATCH] ntp: fix build with musl libc + +The configure script enables HAVE_LINUX_TIMESTAMPING_OPT_PKTINFO based +on the existence of struct scm_ts_pktinfo and +SOF_TIMESTAMPING_OPT_PKTINFO that were introduced in Linux kernel v4.13 +in the linux/net_tstamp.h kernel header. But this feature also requires +SCM_TIMESTAMPING_PKTINFO that is defined in the socket.h header. musl +libc provides its own version of socket.h, and as of musl version 1.1.16 +this macro is missing. Define this macro in the code as a temporary +measure until musl is updated to its latest version. + +Signed-off-by: Baruch Siach +--- +Upstream status: not upstreamable +--- + ntp_io_linux.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ntp_io_linux.c b/ntp_io_linux.c +index 00caed06f7ba..2214a6f6f6c5 100644 +--- a/ntp_io_linux.c ++++ b/ntp_io_linux.c +@@ -574,6 +574,10 @@ extract_udp_data(unsigned char *msg, NTP_Remote_Address *remote_addr, int len) + + /* ================================================== */ + ++#ifndef SCM_TIMESTAMPING_PKTINFO ++#define SCM_TIMESTAMPING_PKTINFO 58 ++#endif ++ + int + NIO_Linux_ProcessMessage(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_addr, + NTP_Local_Timestamp *local_ts, struct msghdr *hdr, int length) +-- +2.15.0 +