From: Vinson Lee <vlee@twopensource.com>
To: trinity@vger.kernel.org
Cc: Vinson Lee <vlee@twitter.com>
Subject: [PATCH] Add SEEK_HOLE and SEEK_DATA symbols for older distros.
Date: Wed, 2 Jul 2014 10:28:56 -0700 [thread overview]
Message-ID: <1404322136-23539-1-git-send-email-vlee@twopensource.com> (raw)
From: Vinson Lee <vlee@twitter.com>
This patch fixes these build errors on CentOS 6.
CC syscalls/lseek.o
syscalls/lseek.c:18: error: ‘SEEK_DATA’ undeclared here (not in a function)
syscalls/lseek.c:18: error: ‘SEEK_HOLE’ undeclared here (not in a function)
Signed-off-by: Vinson Lee <vlee@twitter.com>
---
include/compat.h | 8 ++++++++
syscalls/lseek.c | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/compat.h b/include/compat.h
index 30edc81..64af817 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -910,3 +910,11 @@ struct kvm_get_htab_fd {
#ifndef SWAP_FLAG_DISCARD
#define SWAP_FLAG_DISCARD 0x10000
#endif
+
+/* unistd.h */
+#ifndef SEEK_DATA
+#define SEEK_DATA 3
+#endif
+#ifndef SEEK_HOLE
+#define SEEK_HOLE 4
+#endif
diff --git a/syscalls/lseek.c b/syscalls/lseek.c
index d832e99..a8ca77b 100644
--- a/syscalls/lseek.c
+++ b/syscalls/lseek.c
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <unistd.h>
#include "sanitise.h"
+#include "compat.h"
struct syscallentry syscall_lseek = {
.name = "lseek",
--
1.7.1
reply other threads:[~2014-07-02 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404322136-23539-1-git-send-email-vlee@twopensource.com \
--to=vlee@twopensource.com \
--cc=trinity@vger.kernel.org \
--cc=vlee@twitter.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).