Skip to content

Commit 7478d1b

Browse files
gh-161198: Select the GNU strerror_r variant on Cygwin
1 parent c52b7a8 commit 7478d1b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a build failure on Cygwin when ``strerror_r()`` uses the GNU return type.

‎Python/fileutils.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3319,7 +3319,7 @@ _Py_strerror(int code)
33193319
// Check which strerror_r() API is used
33203320
# if defined(__GLIBC__) && !((_POSIX_C_SOURCE >= 200112L) && !defined(_GNU_SOURCE))
33213321
# define Py_STRERROR_R_GNU
3322-
# elif defined(__ANDROID__) && defined(_GNU_SOURCE)
3322+
# elif (defined(__ANDROID__) || defined(__CYGWIN__)) && defined(_GNU_SOURCE)
33233323
# define Py_STRERROR_R_GNU
33243324
# endif
33253325
#endif

0 commit comments

Comments
 (0)