This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Avoid preprocessor FALLOC_FL_* token redefinitions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]