[PATCH 2/2] Avoid preprocessor FALLOC_FL_* token redefinitions
Sami Kerola
kerolasa@iki.fi
Fri Jan 3 21:01:00 GMT 2014
Plus the earlier header fix.
--->8----
From: Sami Kerola <kerolasa@iki.fi>
Date: Fri, 3 Jan 2014 19:49:02 +0000
Subject: [PATCH 2/2] Avoid preprocessor FALLOC_FL_* token redefinitions
The linux/falloc.h header defines both FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE.
---
ChangeLog | 2 ++
sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index bac04e9..26d175a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2014-01-03 Sami Kerola <kerolasa@iki.fi>
* nscd/nscd.c: Improve usage() output.
+ * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Avoid redefinition
+ warnings.
2014-01-03 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index cd4722b..cbfd52d 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -301,10 +301,14 @@ struct f_owner_ex
/* Flags for fallocate. */
+#ifndef FALLOC_FL_KEEP_SIZE
# define FALLOC_FL_KEEP_SIZE 1 /* Don't extend size of file
even if offset + len is
greater than file size. */
+#endif
+#ifndef FALLOC_FL_PUNCH_HOLE
# define FALLOC_FL_PUNCH_HOLE 2 /* Create a hole in the file. */
+#endif
/* File handle structure. */
--
1.8.5.2
More information about the Libc-help
mailing list