diff --git a/patches/libxml2-2.7.8-pthread.patch b/patches/libxml2-2.7.8-pthread.patch new file mode 100644 index 0000000..8b7b238 --- /dev/null +++ b/patches/libxml2-2.7.8-pthread.patch @@ -0,0 +1,12 @@ +diff --git a/testThreads.c b/testThreads.c +index b43cbd0..5c12894 100644 +--- a/testThreads.c ++++ b/testThreads.c +@@ -107,7 +107,6 @@ main(void) + + for (i = 0; i < num_threads; i++) { + results[i] = NULL; +- tid[i] = (pthread_t) -1; + } + + for (i = 0; i < num_threads; i++) { diff --git a/scripts/012-libxml2-2.7.8.sh b/scripts/012-libxml2-2.7.8.sh index c59dbb7..ed11902 100755 --- a/scripts/012-libxml2-2.7.8.sh +++ b/scripts/012-libxml2-2.7.8.sh @@ -19,6 +19,10 @@ echo "Unpacking ${LIBXML2}" extract ../archives/${LIBXML2}.tar.gz cd ${LIBXML2} +## Patch pthread_t issue for modern toolchains +echo "Patching testThreads.c..." +patch -p1 < ../../patches/${LIBXML2}-pthread.patch + ## Replace config.guess and config.sub cp ../../archives/config.guess ../../archives/config.sub .