aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 9f78b62..34c2d0c 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1077,7 +1077,7 @@ static void __attribute__ ((unused))
set_close_on_exec (int fd __attribute__ ((unused)))
{
/* Mingw does not define F_SETFD. */
-#if defined(F_SETFD) && defined(FD_CLOEXEC)
+#if defined(HAVE_FCNTL) && defined(F_SETFD) && defined(FD_CLOEXEC)
if (fd >= 0)
fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif