From: Vinson Lee <vlee@freedesktop.org>
To: trinity@vger.kernel.org
Cc: Vinson Lee <vlee@twitter.com>
Subject: [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros.
Date: Mon, 24 Mar 2014 14:46:56 -0700 [thread overview]
Message-ID: <1395697616-10620-1-git-send-email-vlee@freedesktop.org> (raw)
From: Vinson Lee <vlee@twitter.com>
This patch fixes this build error on CentOS 6.
CC syscalls/swap.o
syscalls/swap.c:16: error: ‘SWAP_FLAG_DISCARD’ undeclared here (not in a function)
Signed-off-by: Vinson Lee <vlee@twitter.com>
---
include/compat.h | 5 +++++
syscalls/swap.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/compat.h b/include/compat.h
index 9d3be59..f392258 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -862,3 +862,8 @@ struct kvm_get_htab_fd {
#ifndef SCHED_DEADLINE
#define SCHED_DEADLINE 6
#endif
+
+/* sys/swap.h */
+#ifndef SWAP_FLAG_DISCARD
+#define SWAP_FLAG_DISCARD 0x10000
+#endif
diff --git a/syscalls/swap.c b/syscalls/swap.c
index 7eb9d79..c28a54a 100644
--- a/syscalls/swap.c
+++ b/syscalls/swap.c
@@ -3,6 +3,7 @@
*/
#include <sys/swap.h>
#include "sanitise.h"
+#include "compat.h"
struct syscallentry syscall_swapon = {
.name = "swapon",
--
1.7.1
next reply other threads:[~2014-03-24 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 21:46 Vinson Lee [this message]
2014-03-24 22:38 ` [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros Dave Jones
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=1395697616-10620-1-git-send-email-vlee@freedesktop.org \
--to=vlee@freedesktop.org \
--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).