From patchwork Sun Jul 19 08:08:52 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: 497448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id E78E9140284 for ; Sun, 19 Jul 2015 18:09:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9F95032BB8; Sun, 19 Jul 2015 08:09:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id goJo5JUZZVJV; Sun, 19 Jul 2015 08:09:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6DB043299E; Sun, 19 Jul 2015 08:09:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C95E31C1FFD for ; Sun, 19 Jul 2015 08:09:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C4B2A3299E for ; Sun, 19 Jul 2015 08:09:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rUr5lTKfm6IO for ; Sun, 19 Jul 2015 08:08:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx02.posteo.de (mx02.posteo.de [89.146.194.165]) by silver.osuosl.org (Postfix) with ESMTPS id F210C328F7 for ; Sun, 19 Jul 2015 08:08:58 +0000 (UTC) Received: from dovecot04.posteo.de (unknown [185.67.36.27]) by mx02.posteo.de (Postfix) with ESMTPS id 7CDFC25AF52C for ; Sun, 19 Jul 2015 10:08:56 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot04.posteo.de (Postfix) with ESMTPSA id 3mYzNS0NMlzFpW0 for ; Sun, 19 Jul 2015 10:08:56 +0200 (CEST) Received: from nzxt.fritz.box (nzxt.localdomain [192.168.178.46]) (Authenticated sender: joerg.krause@embedded.rocks) by embedded.rocks (Postfix) with ESMTPSA id 6F5949802B0; Sun, 19 Jul 2015 10:08:55 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Sun, 19 Jul 2015 10:08:52 +0200 Message-Id: <1437293332-4918-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.4.6 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] package/upmpdcli: Add patch to fix OPEN_MAX build error 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" When building upmpdcli with certain toolchains using the compiler flag -std=c++0x let gcc not define "linux" or "__linux", but "__linux__". Therefore, the Linux-specific code in closefrom.cpp is not used and the build fails. Fixes: http://autobuild.buildroot.net/results/d66/d660a9409552b3e1ad9e3ed716386fd0a67fd8db http://autobuild.buildroot.net/results/f19/f19e843cdcc968a72919ca3792a90dd40552bd59 http://autobuild.buildroot.net/results/a77/a776001dae51c4dae1f25b3a9bf9a9fe2ca69003 http://autobuild.buildroot.net/results/3e7/3e7590566ed3cc7a1dd412fb66b7b987e847aa25 and many more. Pull request is open on github [1]. [1] https://github.com/medoc92/upmpdcli/pull/15 Signed-off-by: Jörg Krause --- Changes v1 -> v2: - revised patch (suggested by Thomas) --- .../0001-Add-conditional-check-for-__linux__.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch diff --git a/package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch b/package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch new file mode 100644 index 0000000..910ee3c --- /dev/null +++ b/package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch @@ -0,0 +1,32 @@ +From 69740cf6fe35413edc4b6adc502ba70ce8de8557 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 19 Jul 2015 08:48:13 +0200 +Subject: [PATCH 1/1] Add conditional check for __linux__ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When building upmpdcli with certain toolchains using the compiler flag +-std=c++0x let gcc not define "linux" or "__linux", but "__linux__". + +Signed-off-by: Jörg Krause +--- + src/closefrom.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/closefrom.cpp b/src/closefrom.cpp +index 4429b20..0cd7957 100644 +--- a/src/closefrom.cpp ++++ b/src/closefrom.cpp +@@ -111,7 +111,7 @@ int libclf_closefrom(int fd0) + } + + /*************************************************************************/ +-#elif (defined(linux) || defined(__linux)) ++#elif (defined(linux) || defined(__linux) || defined(__linux__)) + + /* Use /proc/self/fd directory */ + #include +-- +2.4.6 +