Hi Antonio,
tarlz 0.27 fails to build from source on debian:
---snip---
[...]
x86_64-linux-gnu-g++ -g -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2
-ffile-prefix-map=/build/tarlz=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security
-fcf-protection -c -o extended.o extended.cc
x86_64-linux-gnu-g++ -g -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2
-ffile-prefix-map=/build/tarlz=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security
-fcf-protection -DPROGVERSION=\"0.27\" -c -o main.o main.cc
extended.cc: In member function ‘void Extended::unknown_keyword(const
char*, int, std::vector<std::__cxx11::basic_string<char> >*) const’:
extended.cc:209:34: error: ‘PTHREAD_MUTEX_INITIALIZER’ was not declared
in this scope
209 | static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:53: extended.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/build/tarlz'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2
(sid_amd64)build@daniel:~/tarlz$
---snap---
Including pthread.h in extended.cc fixes this, see the attached patch as
a suggestion.
Regards,
DanielAuthor: Daniel Baumann <[email protected]>
Description: Fixing FTBFS about undeclared PTHREAD_MUTEX_INITIALIZER by including missing pthread header.
diff -Naurp tarlz.orig/extended.cc tarlz/extended.cc
--- tarlz.orig/extended.cc
+++ tarlz/extended.cc
@@ -21,6 +21,8 @@
#include <cerrno>
#include <cstdio>
+#include <pthread.h>
+
#include "tarlz.h"
#include "common_mutex.h"