From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id E4400385840F; Fri, 3 Sep 2021 10:26:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4400385840F Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] nftw: fix thread cancellation support X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: d5cc66426b49068919cf3a3c44e186c38ae2fc19 X-Git-Newrev: 6a35ae33f5c76f0cda6466fb4b426ff37ed534a1 Message-Id: <20210903102634.E4400385840F@sourceware.org> Date: Fri, 3 Sep 2021 10:26:34 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 10:26:35 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6a35ae33f5c76f0cda6466fb4b426ff37ed534a1 commit 6a35ae33f5c76f0cda6466fb4b426ff37ed534a1 Author: Corinna Vinschen Date: Fri Sep 3 12:25:44 2021 +0200 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 Diff: --- newlib/libc/posix/nftw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #include #include +/* 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