This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
[PATCH 2/2] 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: Fri, 3 Jan 2014 21:00:57 +0000
- Subject: [PATCH 2/2] Avoid preprocessor FALLOC_FL_* token redefinitions
- Authentication-results: sourceware.org; auth=none
- References: <1388782857-11037-1-git-send-email-kerolasa at iki dot fi>
- References: <201401030812 dot 18617 dot vapier at gentoo dot org> <1388695739-1248-1-git-send-email-kerolasa at iki dot fi> <201401020612 dot 59677 dot vapier at gentoo dot org> <1388607607-16716-1-git-send-email-kerolasa at iki dot fi> <1388695739-1248-1-git-send-email-kerolasa at iki dot fi>
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