[vte/vte-0-34] portability: protect O_NOATIME
- From: Antoine Jacoutot <ajacoutot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-34] portability: protect O_NOATIME
- Date: Tue, 15 Oct 2013 11:24:11 +0000 (UTC)
commit eb470ad6ee33dbd5749cc4c03ca3fdab27aa77cd
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 1371cb2..d86ea61 100644
--- a/src/vteutils.c
+++ b/src/vteutils.c
@@ -63,7 +63,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]