diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-12-01 21:56:44 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-12-01 21:56:44 +0100 |
commit | 1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7 (patch) | |
tree | dd26d5bc619271f8cccf0c9d7abdda9a1749d13f /package/motion/0002-Check-for-pthread_getname_np.patch | |
parent | 57dcad243e6daefefbe21109e1fc97272053a7a0 (diff) | |
parent | 787a31fed42f98a8e2e6a0bd2079376c861436f2 (diff) | |
download | buildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.tar.gz buildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.zip |
Merge branch 'next'
This merges the next branch accumulated during the 2017.11 release
cycle back into the master branch.
A few conflicts had to be resolved:
- In the DEVELOPERS file, because Fabrice Fontaine was added as a
developer for libupnp in master, and for libupnp18 in
next. Resolution is simple: add him for both.
- linux/Config.in, because we updated the 4.13.x release used by
default in master, while we moved to 4.14 in next. Resolution: use
4.14.
- package/libupnp/libupnp.hash: a hash for the license file was added
in master, while the package was bumped into next. Resolution: keep
the hash for the license file, and keep the hash for the newest
version of libupnp.
- package/linux-headers/Config.in.host: default version of the kernel
headers for 4.13 was bumped to the latest 4.13.x in master, but was
changed to 4.14 in next. Resolution: use 4.14.
- package/samba4/: samba was bumped to 4.6.11 in master for security
reasons, but was bumped to 4.7.3 in next. Resolution: keep 4.7.3.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/motion/0002-Check-for-pthread_getname_np.patch')
-rw-r--r-- | package/motion/0002-Check-for-pthread_getname_np.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/package/motion/0002-Check-for-pthread_getname_np.patch b/package/motion/0002-Check-for-pthread_getname_np.patch new file mode 100644 index 0000000000..c6b5d6aa74 --- /dev/null +++ b/package/motion/0002-Check-for-pthread_getname_np.patch @@ -0,0 +1,66 @@ +From 4067b793689f740e86b2f070c63cc72860347ab5 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Thu, 23 Nov 2017 22:53:03 +0100 +Subject: [PATCH] Check for pthread_getname_np + +On some toolchains (like musl), pthread_setname_np is available but not +pthread_getname_np so add this check in configure.ac + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + configure.ac | 11 +++++++++++ + logger.c | 2 +- + motion.c | 2 +- + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 21efd2a..06b2990 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,6 +140,17 @@ if test x$THREADS = xyes; then + [AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define if you have pthread_setname_np function.]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] ) ++ ++############################################################################## ++### Check for pthread_getname_np (nonstandard GNU extension) ++############################################################################## ++ AC_MSG_CHECKING([for pthread_getname_np]) ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_getname_np(pthread_self(), NULL, 0)])], ++ [AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], [1], [Define if you have pthread_getname_np function.]) ++ AC_MSG_RESULT([yes])], ++ [AC_MSG_RESULT([no])] ) ++ + LIBS="$HOLD_LIBS" + fi + +diff --git a/logger.c b/logger.c +index 01ea5a5..fd80d77 100644 +--- a/logger.c ++++ b/logger.c +@@ -207,7 +207,7 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, . + errno_save = errno; + + char threadname[32] = "unknown"; +-#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__)) ++#if ((!defined(BSD) && HAVE_PTHREAD_GETNAME_NP) || defined(__APPLE__)) + pthread_getname_np(pthread_self(), threadname, sizeof(threadname)); + #endif + +diff --git a/motion.c b/motion.c +index 8570896..985d4b2 100644 +--- a/motion.c ++++ b/motion.c +@@ -3772,7 +3772,7 @@ void util_threadname_set(const char *abbr, int threadnbr, const char *threadname + + void util_threadname_get(char *threadname){ + +-#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__)) ++#if ((!defined(BSD) && HAVE_PTHREAD_GETNAME_NP) || defined(__APPLE__)) + char currname[16]; + pthread_getname_np(pthread_self(), currname, sizeof(currname)); + snprintf(threadname, sizeof(currname), "%s",currname); +-- +2.14.1 + |