[vlc-devel] [PATCH 1/4] configure: always pass -pthread on Linux

RĂ©mi Denis-Courmont remi at remlab.net
Sun Jun 17 11:24:45 CEST 2018


This appears to be the official way to get POSIX threads. In practice,
it pre-defines _REENTRANT to 1 and pulls -lpthread.
(This works with both GCC and Clang.)
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c96778e04e..eaa17947b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,7 @@ case "${host_os}" in
     ;;
   linux*)
     SYS=linux
-    test "${host_cpu}" = "riscv64" && CFLAGS="${CFLAGS} -pthread"
+    CFLAGS="${CFLAGS} -pthread"
     ;;
   bsdi*)
     SYS=bsdi
-- 
2.17.1



More information about the vlc-devel mailing list