package/upmpdcli: Add patch to fix OPEN_MAX build error
PATCH v2 1/1 package/upmpdcli: Add patch to fix OPEN_MAX build error
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
---
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
package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 69740cf6fe35413edc4b6adc502ba70ce8de8557 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +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 <[email protected]> +--- + 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 <sys/types.h> +-- +2.4.6 +
Signature · 1 line
2.4.6
Thomas Petazzoni
AppliedPATCH v2 1/1 package/upmpdcli: Add patch to fix OPEN_MAX build error
Dear J?rg Krause,
Quoted 17 lines · J?rg Krause
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/3e7590566ed3cc7a1dd412fb66b7b987e847aa25and many more.
Pull request is open on github [1].
Quoted 8 lines
Signed-off-by J?rg Krause <[email protected]>---
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
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com