[vte/vte-next] portability: protect O_NOATIME



commit fc722337090d42abfc1f19523c85dc1b47f59834
Author: Antoine Jacoutot <ajacoutot gnome org>
Date:   Tue Oct 15 13:21:15 2013 +0200

    portability: protect O_NOATIME
    
    The O_NOATIME open() flag is only available on Linux, so unbreak building
    by protecting it with an ifdef.

 src/vteutils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/vteutils.c b/src/vteutils.c
index 7615f51..0911e37 100644
--- a/src/vteutils.c
+++ b/src/vteutils.c
@@ -67,7 +67,9 @@ _vte_mkstemp (void)
         unlink (file_name);
         g_free (file_name);
 
+#ifdef O_NOATIME
         do { } while (fcntl (fd, F_SETFL, O_NOATIME) == -1 && errno == EINTR);
+#endif
 
 #ifdef O_TMPFILE
  done:


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