Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / findutils-test-rwlock-threads.patch
1 Skip "test-rwlock1" when multithreading is disabled, which is the case
2 during bootstrapping on architectures not supported by GNU Mes.
3
4 Taken from upstream gnulib:
5 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fdff8bd09a7f053381f8bdb107ab5280b7c95959
6
7 diff --git a/gnulib-tests/test-rwlock1.c b/gnulib-tests/test-rwlock1.c
8 --- a/gnulib-tests/test-rwlock1.c
9 +++ b/gnulib-tests/test-rwlock1.c
10 @@ -21,6 +21,8 @@
11
12 #include <config.h>
13
14 +#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
15 +
16 #include "glthread/lock.h"
17
18 #include <errno.h>
19 @@ -151,3 +153,18 @@ main ()
20 sleep (1);
21 }
22 }
23 +
24 +#else
25 +
26 +/* No multithreading available. */
27 +
28 +#include <stdio.h>
29 +
30 +int
31 +main ()
32 +{
33 + fputs ("Skipping test: multithreading not enabled\n", stderr);
34 + return 77;
35 +}
36 +
37 +#endif
38