[CRIU] [crtools-bot for Kinsbursky Stanislav ] ipc: define KEY as global

Cyrill Gorcunov gorcunov at openvz.org
Fri Feb 10 05:14:20 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 71471920309a6033bec3ae944a88230821b842af
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date:   Fri Feb 10 13:05:06 2012 +0300

    ipc: define KEY as global
    
    Define "KEY" is used also on restore stage.
    
    Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 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