[CRIU] [PATCH] ipc: define KEY as global

Kinsbursky Stanislav skinsbursky at openvz.org
Fri Feb 10 05:05:06 EST 2012


Define "KEY" is used also on restore stage.

Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>

---
 ipc_ns.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ipc_ns.c b/ipc_ns.c
index 634f66e..cb40b9a 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -13,6 +13,12 @@
 #include "namespaces.h"
 #include "sysctl.h"
 
+#if defined (__GLIBC__) && __GLIBC__ >= 2
+#define KEY __key
+#else
+#define KEY key
+#endif
+
 #ifndef IPC_PRESET
 #define IPC_PRESET		00040000
 #endif
@@ -31,11 +37,6 @@ static void print_ipc_seg(const struct ipc_seg *seg)
 
 static void fill_ipc_seg(int id, struct ipc_seg *seg, const struct ipc_perm *ipcp)
 {
-#if defined (__GLIBC__) && __GLIBC__ >= 2
-#define KEY __key
-#else
-#define KEY key
-#endif
 	seg->id = id;
 	seg->key = ipcp->KEY;
 	seg->uid = ipcp->uid;



More information about the CRIU mailing list