All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros.
@ 2014-03-24 21:46 Vinson Lee
  2014-03-24 22:38 ` Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Vinson Lee @ 2014-03-24 21:46 UTC (permalink / raw)
  To: trinity; +Cc: Vinson Lee

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros.
  2014-03-24 21:46 [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros Vinson Lee
@ 2014-03-24 22:38 ` Dave Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2014-03-24 22:38 UTC (permalink / raw)
  To: Vinson Lee; +Cc: trinity, Vinson Lee

On Mon, Mar 24, 2014 at 02:46:56PM -0700, Vinson Lee wrote:
 > 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)

applied, thanks.

	Dave

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-24 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 21:46 [PATCH] Add SWAP_FLAG_DISCARD symbol for older distros Vinson Lee
2014-03-24 22:38 ` Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.