mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
openhpi: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 14 Sep 2017 17:56:31 -0700
|
||||||
|
Subject: [PATCH] ipmidirect: Replace __STRING
|
||||||
|
|
||||||
|
__STRING is not universally available e.g.
|
||||||
|
musl does not define it
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
plugins/ipmidirect/t/test.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h
|
||||||
|
index 8d71381..978d5ff 100644
|
||||||
|
--- a/plugins/ipmidirect/t/test.h
|
||||||
|
+++ b/plugins/ipmidirect/t/test.h
|
||||||
|
@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr )
|
||||||
|
+#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr )
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From be665d9513cca7e8b64c79ae424cf44ac166b052 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 14 Sep 2017 17:07:58 -0700
|
||||||
|
Subject: [PATCH] plugins: Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
|
before use
|
||||||
|
|
||||||
|
musl does not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
|
so we can not assume that all Linux systems support PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
|
its a glibc specific define so check for it being defined before using it
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
plugins/dynamic_simulator/thread.cpp | 2 +-
|
||||||
|
plugins/ipmidirect/thread.cpp | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp
|
||||||
|
index d663be0..9210fd7 100644
|
||||||
|
--- a/plugins/dynamic_simulator/thread.cpp
|
||||||
|
+++ b/plugins/dynamic_simulator/thread.cpp
|
||||||
|
@@ -229,7 +229,7 @@ cThread::Exit( void *rv )
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
**/
|
||||||
|
-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__)
|
||||||
|
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
|
cThreadLock::cThreadLock()
|
||||||
|
{
|
||||||
|
pthread_mutexattr_t attr;
|
||||||
|
diff --git a/plugins/ipmidirect/thread.cpp b/plugins/ipmidirect/thread.cpp
|
||||||
|
index 5c52557..48e83fa 100644
|
||||||
|
--- a/plugins/ipmidirect/thread.cpp
|
||||||
|
+++ b/plugins/ipmidirect/thread.cpp
|
||||||
|
@@ -167,7 +167,7 @@ cThread::Exit( void *rv )
|
||||||
|
// cThreadLock
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
|
-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__)
|
||||||
|
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
|
cThreadLock::cThreadLock()
|
||||||
|
{
|
||||||
|
pthread_mutexattr_t attr;
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
||||||
@@ -23,6 +23,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
|
|||||||
DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native"
|
DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native"
|
||||||
|
|
||||||
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
|
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
|
||||||
|
file://openhpi.init \
|
||||||
|
file://openhpid.service \
|
||||||
|
file://run-ptest \
|
||||||
file://openhpi-netsnmp-cross-compile.patch \
|
file://openhpi-netsnmp-cross-compile.patch \
|
||||||
file://openhpi-sysfs-cross-compile.patch \
|
file://openhpi-sysfs-cross-compile.patch \
|
||||||
file://openhpi-libxml2-cross-compile.patch \
|
file://openhpi-libxml2-cross-compile.patch \
|
||||||
@@ -39,11 +42,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
|
|||||||
file://c++11.patch \
|
file://c++11.patch \
|
||||||
file://clang-c++11.patch \
|
file://clang-c++11.patch \
|
||||||
file://fix-narrowing-warning.patch \
|
file://fix-narrowing-warning.patch \
|
||||||
\
|
file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \
|
||||||
file://openhpi.init \
|
file://0001-ipmidirect-Replace-__STRING.patch \
|
||||||
file://openhpid.service \
|
"
|
||||||
file://run-ptest \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"
|
SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"
|
||||||
SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
|
SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
|
||||||
|
|||||||
Reference in New Issue
Block a user