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>
This commit is contained in:
Corinna Vinschen 2021-09-03 12:25:44 +02:00
parent d5cc66426b
commit 6a35ae33f5
1 changed files with 3 additions and 1 deletions

View File

@ -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