From 0fbd2f6a8976d27743a532ac6d7cbf384a4cb307 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Thu, 26 May 2016 16:07:28 +0600 Subject: [PATCH] python-lxc: don't use private lxc/utils.h Signed-off-by: Aleksandr Mezin --- src/python-lxc/lxc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c index 61c192c87..fbbabdb8f 100644 --- a/src/python-lxc/lxc.c +++ b/src/python-lxc/lxc.c @@ -25,7 +25,6 @@ #include #include "structmember.h" #include -#include "lxc/utils.h" #include "lxc/confile.h" #include #include @@ -61,6 +60,23 @@ /* Helper functions */ +/* Copied from lxc/utils.c */ +static int lxc_wait_for_pid_status(pid_t pid) +{ + int status, ret; + +again: + ret = waitpid(pid, &status, 0); + if (ret == -1) { + if (errno == EINTR) + goto again; + return -1; + } + if (ret != pid) + goto again; + return status; +} + char** convert_tuple_to_char_pointer_array(PyObject *argv) { int argc; -- 2.47.3