From patchwork Mon Sep 14 23:22:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 517633 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 7B3D3140784 for ; Tue, 15 Sep 2015 09:23:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b=RFYGwZDj; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 69E2A88E9B; Mon, 14 Sep 2015 23:23:04 +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 HVgzfLrFeE2X; Mon, 14 Sep 2015 23:23:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 958D388E8C; Mon, 14 Sep 2015 23:23:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C9A461CEDBE for ; Mon, 14 Sep 2015 23:22:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C4CD5878C3 for ; Mon, 14 Sep 2015 23:22:59 +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 PZ9BKx52CVyt for ; Mon, 14 Sep 2015 23:22:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D70D1878BC for ; Mon, 14 Sep 2015 23:22:57 +0000 (UTC) Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id C606E2085C for ; Tue, 15 Sep 2015 01:22:55 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3nFNyl4bwrz5vMJ for ; Tue, 15 Sep 2015 01:22:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded.rocks (Postfix) with ESMTP id 07265EE0C51; Tue, 15 Sep 2015 01:22:55 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1442272961; x=1442877762; bh=cO1OIH+5mgs1Z3WucFuZPdaqsEzR3XDyXJz7vBgJRH4=; b=RFYGwZDjCbgf LDF+Y5DYf54FVeLr85w1pr0nVMLi9s3eQIlV0KGQE2Kmy0kl0a+R3tiH118esNY3 k4W3z+AmnXbde+ITVSr4dviJqDnSMNCVJ+292SXD21ZTkSB041zW5Uo6H7eUZzNB CSwCRfPHK0yq6GKgCo+EeNCC7iTLnvaRM2O0PPTcPciCBoAtaAbcb+5oAd/A24Am TCy3WIZg1D0tFHtxrQ/B35Vc1kXRcjEggRXrsWtuINUEW1ZbEob+5SGs2fIRGTVa Tchv+pAspe+elnp1GU8V8HG8NS2kBZPR/uvxnCKMilZdj1xiGsx/i0e6z3hZ47Uw Wv2tLR48mw== X-Virus-Scanned: Debian amavisd-new at mail.embedded.rocks Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 8Ka62kpW-mHN; Tue, 15 Sep 2015 01:22:41 +0200 (CEST) Received: from nzxt.fritz.box (x4d0cd9c1.dyn.telefonica.de [77.12.217.193]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 15 Sep 2015 01:22:41 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Tue, 15 Sep 2015 01:22:39 +0200 Message-Id: <1442272959-3181-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.5.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/luaposix: add patch to fix musl compatibility X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backport patch from upstream to fix musl build error: ``` In file included from ext/posix/posix.c:25:0: ext/posix/sched.c: In function 'Psched_setscheduler': ext/posix/sched.c:74:9: error: variable 'sched_param' has initializer but incomplete type struct sched_param sched_param = {0}; ``` Fixed upstream by commit 11cc8a2973569ec7fb1e7c2466dca0282944b124. Signed-off-by: Jörg Krause --- ...round-glibc-_POSIX_PRIORITY_SCHEDULING-bu.patch | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/luaposix/0001-sched-workaround-glibc-_POSIX_PRIORITY_SCHEDULING-bu.patch diff --git a/package/luaposix/0001-sched-workaround-glibc-_POSIX_PRIORITY_SCHEDULING-bu.patch b/package/luaposix/0001-sched-workaround-glibc-_POSIX_PRIORITY_SCHEDULING-bu.patch new file mode 100644 index 0000000..3853e9f --- /dev/null +++ b/package/luaposix/0001-sched-workaround-glibc-_POSIX_PRIORITY_SCHEDULING-bu.patch @@ -0,0 +1,59 @@ +From de2a9b45e7b4a89affa3ac6d0a010cc627ab4a87 Mon Sep 17 00:00:00 2001 +From: "Gary V. Vaughan" +Date: Mon, 6 Apr 2015 18:39:46 -0700 +Subject: [PATCH 1/1] sched: workaround glibc _POSIX_PRIORITY_SCHEDULING bug. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Close #223. +* configure.ac (AC_CHECK_HEADERS): Add sched.h. +* ext/posix/sched.c: Remove unistd.h; Predicate use of priority +scheduling APIs on presence of sched.h instead of +_POSIX_PRIORITY_SCHEDULING macro erroneously defined by glibc on +Linux. +Reported by ncopa@github.com. + +Backported from: 11cc8a2973569ec7fb1e7c2466dca0282944b124 + +Signed-off-by: Gary V. Vaughan +[Backport] +Signed-off-by: Jörg Krause +--- + configure.ac | 2 +- + ext/posix/sched.c | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index aa18318..89a2feb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -114,7 +114,7 @@ gl_INIT + + ## Check for header files + AC_HEADER_STDC +-AC_CHECK_HEADERS([crypt.h strings.h sys/statvfs.h]) ++AC_CHECK_HEADERS([crypt.h sched.h strings.h sys/statvfs.h]) + AC_CHECK_HEADERS([net/if.h linux/netlink.h], [], [], [ + #include + ]) +diff --git a/ext/posix/sched.c b/ext/posix/sched.c +index 13b196b..f338d73 100644 +--- a/ext/posix/sched.c ++++ b/ext/posix/sched.c +@@ -21,9 +21,10 @@ + + #include + +-#include /* for _POSIX_PRIORITY_SCHEDULING */ ++/* cannot use unistd.h for _POSIX_PRIORITY_SCHEDULING, because on Linux ++ glibc it is defined even though the APIs are not implemented :-( */ + +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#ifdef HAVE_SCHED_H + #include + #endif + +-- +2.5.2 +