[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux