]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
namespace: use lxc_getpagesize() 1864/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 21 Oct 2017 14:27:34 +0000 (16:27 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 21 Oct 2017 16:38:14 +0000 (18:38 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/namespace.c

index 3a5b3bef6c5bde2e66ad76657cb129a5d8b50b84..e760c0d9a0ff37eaea5871b638d7c2e788b7fbe4 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <unistd.h>
 #include <alloca.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <signal.h>
+#include <unistd.h>
 #include <sys/param.h>
-#include <sys/types.h>
 #include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
 
-#include "namespace.h"
 #include "log.h"
+#include "namespace.h"
+#include "utils.h"
 
 lxc_log_define(lxc_namespace, lxc);
 
@@ -53,7 +54,7 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int flags)
                .arg = arg,
        };
 
-       size_t stack_size = sysconf(_SC_PAGESIZE);
+       size_t stack_size = lxc_getpagesize();
        void *stack = alloca(stack_size);
        pid_t ret;