[glib/2325-symlink-replace-file: 3/4] fixup! glocalfileoutputstream: Add a missing O_CLOEXEC flag to replace()




commit be833fdb15c7738469566ef3d1eba59d4e184393
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Mar 10 17:48:53 2021 +0000

    fixup! glocalfileoutputstream: Add a missing O_CLOEXEC flag to replace()

 gio/glocalfileoutputstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index 5df78f79a..4c512ea81 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -1275,7 +1275,7 @@ _g_local_file_output_stream_replace (const char        *filename,
       set_error_from_open_errno (filename, error);
       return NULL;
     }
-#ifndef HAVE_O_CLOEXEC
+#if !defined(HAVE_O_CLOEXEC) && defined(F_SETFD)
   else
     fcntl (fd, F_SETFD, FD_CLOEXEC);
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]