This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
[PATCH] Avoid preprocessor FALLOC_FL_* token redefinitions
- From: Sami Kerola <kerolasa at iki dot fi>
- To: libc-help at sourceware dot org
- Cc: kerolasa at iki dot fi
- Date: Wed, 1 Jan 2014 22:15:10 +0000
- Subject: [PATCH] Avoid preprocessor FALLOC_FL_* token redefinitions
- Authentication-results: sourceware.org; auth=none
The linux/falloc.h header defines both FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE.
---
sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 4 ++++
1 file changed, 4 insertions(+)
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