diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2021-09-03 13:25:44 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-09-03 13:26:17 +0300 |
commit | 6a35ae33f5c76f0cda6466fb4b426ff37ed534a1 (patch) | |
tree | 37ebb1252113a55e31acbaf1ddde8383805e14dd /newlib/libc | |
parent | d5cc66426b49068919cf3a3c44e186c38ae2fc19 (diff) |
nftw: fix thread cancellation support
_STDIO_WITH_THREAD_CANCELLATION_SUPPORT was never defined.
Include ../stdio/local.h to get the right definition per target.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/posix/nftw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/posix/nftw.c b/newlib/libc/posix/nftw.c index f4f55f341..c45cc8f17 100644 --- a/newlib/libc/posix/nftw.c +++ b/newlib/libc/posix/nftw.c @@ -29,6 +29,8 @@ #include <string.h> #include <limits.h> #include <pthread.h> +/* Pull in _STDIO_WITH_THREAD_CANCELLATION_SUPPORT */ +#include "../stdio/local.h" struct history { @@ -141,7 +143,7 @@ int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, str return -1; } memcpy(pathbuf, path, l+1); - + #ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); #endif |