summaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-08-08 09:50:28 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-08-08 07:50:28 +0000
commit0fddb1847019ceb570c6e0aea0ea779f1f9988cf (patch)
tree8b7110505306ba08d399f18bc2af2f9037284603 /gcc/lto-wrapper.c
parentfe8e21fd730f01815bf6533289d2b3e33033a250 (diff)
Fix file descriptor existence of MinGW.
2019-08-08 Martin Liska <mliska@suse.cz> PR bootstrap/91352 * gcc.c (driver::detect_jobserver): Use is_valid_fd. * lto-wrapper.c (jobserver_active_p): Likewise. 2019-08-08 Martin Liska <mliska@suse.cz> PR bootstrap/91352 * libiberty.h (is_valid_fd): New function. 2019-08-08 Martin Liska <mliska@suse.cz> PR bootstrap/91352 * lrealpath.c (is_valid_fd): New function. From-SVN: r274208
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index f93ff504e88..f1253cdc91c 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1237,8 +1237,8 @@ jobserver_active_p (void)
return (sscanf (n + strlen (needle), "%d,%d", &rfd, &wfd) == 2
&& rfd > 0
&& wfd > 0
- && fcntl (rfd, F_GETFD) >= 0
- && fcntl (wfd, F_GETFD) >= 0);
+ && is_valid_fd (rfd)
+ && is_valid_fd (wfd));
}
/* Execute gcc. ARGC is the number of arguments. ARGV contains the arguments. */