* [patch] fallocate.2: Reference header linux/falloc.h
@ 2012-12-16 15:08 Filipe David Manana
[not found] ` <CAL3q7H6SXux13tVdjaUwXOA4Zu7kTtFJcyOKAmyyYCZvjgFzWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Filipe David Manana @ 2012-12-16 15:08 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
This affects all versions of the man pages that include fallocate.2
(to my knowledge).
Attempting to compile a program that calls fallocate() and references
the modes FALLOC_FL_KEEP_SIZE or FALLOC_FL_PUNCH_HOLE fails, because
these constants are not defined in fcntl.h (the only header referenced
in the man page for fallocate.2).
Patch follows inline below, and as an attachment as well.
Thank you.
>From 50b3cac563f6646fc75ffb8658064b25529cadea Mon Sep 17 00:00:00 2001
From: Filipe David Borba Manana <fdmanana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Sun, 16 Dec 2012 14:56:47 +0000
Subject: [PATCH] fallocate.2: Reference header linux/falloc.h
This header file is where the constants used for the
mode parameter are defined (FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE at the moment).
---
man2/fallocate.2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 363e50f..4aea591 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -12,6 +12,7 @@ fallocate \- manipulate file space
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <fcntl.h>
+.B #include <linux/falloc.h>
.BI "int fallocate(int " fd ", int " mode ", off_t " offset \
", off_t " len ");
--
1.7.9.5
--
Filipe David Manana,
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."
[-- Attachment #2: 0001-fallocate.2-Reference-header-linux-falloc.h.patch --]
[-- Type: application/octet-stream, Size: 840 bytes --]
From 50b3cac563f6646fc75ffb8658064b25529cadea Mon Sep 17 00:00:00 2001
From: Filipe David Borba Manana <fdmanana@gmail.com>
Date: Sun, 16 Dec 2012 14:56:47 +0000
Subject: [PATCH] fallocate.2: Reference header linux/falloc.h
This header file is where the constants used for the
mode parameter are defined (FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE at the moment).
---
man2/fallocate.2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 363e50f..4aea591 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -12,6 +12,7 @@ fallocate \- manipulate file space
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <fcntl.h>
+.B #include <linux/falloc.h>
.BI "int fallocate(int " fd ", int " mode ", off_t " offset \
", off_t " len ");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-17 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 15:08 [patch] fallocate.2: Reference header linux/falloc.h Filipe David Manana
[not found] ` <CAL3q7H6SXux13tVdjaUwXOA4Zu7kTtFJcyOKAmyyYCZvjgFzWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-17 1:11 ` Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).