motion: fix musl
This commit is contained in:
parent
3adfac9337
commit
96739ecb7a
2 changed files with 29 additions and 6 deletions
29
srcpkgs/motion/patches/musl-no-pthread_getname_np.patch
Normal file
29
srcpkgs/motion/patches/musl-no-pthread_getname_np.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- motion.c 2017-11-11 04:47:06.000000000 +0100
|
||||
+++ motion.c 2017-11-12 22:49:59.866870114 +0100
|
||||
@@ -3774,11 +3774,15 @@
|
||||
|
||||
#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__))
|
||||
char currname[16];
|
||||
+#if defined(__GLIBC__)
|
||||
pthread_getname_np(pthread_self(), currname, sizeof(currname));
|
||||
snprintf(threadname, sizeof(currname), "%s",currname);
|
||||
#else
|
||||
snprintf(threadname, 8, "%s","Unknown");
|
||||
#endif
|
||||
+#else
|
||||
+ snprintf(threadname, 8, "%s","Unknown");
|
||||
+#endif
|
||||
|
||||
}
|
||||
int util_check_passthrough(struct context *cnt){
|
||||
--- logger.c 2017-11-11 04:47:06.000000000 +0100
|
||||
+++ logger.c 2017-11-12 22:53:58.717887149 +0100
|
||||
@@ -207,7 +207,7 @@
|
||||
errno_save = errno;
|
||||
|
||||
char threadname[32] = "unknown";
|
||||
-#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP) || defined(__APPLE__))
|
||||
+#if ((!defined(BSD) && HAVE_PTHREAD_SETNAME_NP && defined(__GLIBC__)) || defined(__APPLE__))
|
||||
pthread_getname_np(pthread_self(), threadname, sizeof(threadname));
|
||||
#endif
|
||||
|
|
@ -13,12 +13,6 @@ homepage="https://motion-project.github.io/"
|
|||
distfiles="https://github.com/Motion-Project/motion/archive/release-${version}.tar.gz"
|
||||
checksum=277029c80df0d37deefbbea6d15c66a9067d9166fe8f76eb5f90aa6e97aa9741
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) broken=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
pre_configure() {
|
||||
autoreconf -fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue