summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@gnome.org>2013-10-15 13:21:15 +0200
committerAntoine Jacoutot <ajacoutot@gnome.org>2013-10-15 13:24:26 +0200
commitfc722337090d42abfc1f19523c85dc1b47f59834 (patch)
tree4569a154fca1f6c5b513a270175bdb040194ada2
parent45de93eceba0772b4ff4baea3785e9010aeb9baf (diff)
downloadvte-next.tar.gz
portability: protect O_NOATIMEvte-next
The O_NOATIME open() flag is only available on Linux, so unbreak building by protecting it with an ifdef.
-rw-r--r--src/vteutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vteutils.c b/src/vteutils.c
index 7615f51e..0911e373 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: