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:
parent
d5cc66426b
commit
6a35ae33f5
|
@ -29,6 +29,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
/* Pull in _STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
|
||||||
|
#include "../stdio/local.h"
|
||||||
|
|
||||||
struct history
|
struct history
|
||||||
{
|
{
|
||||||
|
@ -141,7 +143,7 @@ int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, str
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memcpy(pathbuf, path, l+1);
|
memcpy(pathbuf, path, l+1);
|
||||||
|
|
||||||
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
|
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue