diff options
Diffstat (limited to 'main/lxc/lxc-fix-headers.patch')
-rw-r--r-- | main/lxc/lxc-fix-headers.patch | 352 |
1 files changed, 352 insertions, 0 deletions
diff --git a/main/lxc/lxc-fix-headers.patch b/main/lxc/lxc-fix-headers.patch new file mode 100644 index 0000000000..229f3aade5 --- /dev/null +++ b/main/lxc/lxc-fix-headers.patch @@ -0,0 +1,352 @@ +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lua-lxc/core.c lxc-0.9.0/src/lua-lxc/core.c +--- lxc-0.9.0.orig/src/lua-lxc/core.c 2013-03-18 22:17:00.000000000 +0000 ++++ lxc-0.9.0/src/lua-lxc/core.c 2013-09-10 12:07:34.069998459 +0000 +@@ -21,7 +21,6 @@ + */ + + #define LUA_LIB +-#define _GNU_SOURCE + #include <lua.h> + #include <lauxlib.h> + #include <string.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/attach.c lxc-0.9.0/src/lxc/attach.c +--- lxc-0.9.0.orig/src/lxc/attach.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/attach.c 2013-09-10 12:18:59.499998326 +0000 +@@ -21,13 +21,14 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE ++#include "config.h" + #include <unistd.h> + #include <stdio.h> + #include <string.h> + #include <stdlib.h> + #include <errno.h> + #include <fcntl.h> ++#include <sched.h> + #include <sys/param.h> + #include <sys/prctl.h> + #include <sys/mount.h> +@@ -44,7 +45,6 @@ + #include "log.h" + #include "attach.h" + #include "caps.h" +-#include "config.h" + #include "apparmor.h" + + lxc_log_define(lxc_attach, lxc); +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/caps.c lxc-0.9.0/src/lxc/caps.c +--- lxc-0.9.0.orig/src/lxc/caps.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/caps.c 2013-09-10 12:19:34.019998319 +0000 +@@ -21,7 +21,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE ++#include "config.h" + #include <unistd.h> + #include <fcntl.h> + #include <stdlib.h> +@@ -29,7 +29,6 @@ + #include <sys/prctl.h> + #include <errno.h> + +-#include "config.h" + #include "log.h" + + lxc_log_define(lxc_caps, lxc); +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/cgroup.c lxc-0.9.0/src/lxc/cgroup.c +--- lxc-0.9.0.orig/src/lxc/cgroup.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/cgroup.c 2013-09-10 12:07:34.149998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <errno.h> + #include <unistd.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/commands.c lxc-0.9.0/src/lxc/commands.c +--- lxc-0.9.0.orig/src/lxc/commands.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/commands.c 2013-09-10 12:10:17.479998427 +0000 +@@ -28,7 +28,7 @@ + #include <fcntl.h> + #include <sys/socket.h> + #include <sys/un.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <sys/param.h> + #include <malloc.h> + #include <stdlib.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/conf.c lxc-0.9.0/src/lxc/conf.c +--- lxc-0.9.0.orig/src/lxc/conf.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/conf.c 2013-09-10 12:07:34.239998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <stdarg.h> + #include <errno.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/confile.c lxc-0.9.0/src/lxc/confile.c +--- lxc-0.9.0.orig/src/lxc/confile.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/confile.c 2013-09-10 12:07:34.299998459 +0000 +@@ -20,7 +20,6 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/freezer.c lxc-0.9.0/src/lxc/freezer.c +--- lxc-0.9.0.orig/src/lxc/freezer.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/freezer.c 2013-09-10 12:07:34.329998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <errno.h> + #include <unistd.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_attach.c lxc-0.9.0/src/lxc/lxc_attach.c +--- lxc-0.9.0.orig/src/lxc/lxc_attach.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_attach.c 2013-09-10 12:07:34.379998459 +0000 +@@ -21,7 +21,6 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE + #include <unistd.h> + #include <errno.h> + #include <pwd.h> +Binary files lxc-0.9.0.orig/src/lxc/lxc_attach.o and lxc-0.9.0/src/lxc/lxc_attach.o differ +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_checkpoint.c lxc-0.9.0/src/lxc/lxc_checkpoint.c +--- lxc-0.9.0.orig/src/lxc/lxc_checkpoint.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_checkpoint.c 2013-09-10 12:07:34.379998459 +0000 +@@ -20,7 +20,6 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <assert.h> + #include <stdio.h> + #include <stdlib.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_console.c lxc-0.9.0/src/lxc/lxc_console.c +--- lxc-0.9.0.orig/src/lxc/lxc_console.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_console.c 2013-09-10 12:10:46.179998421 +0000 +@@ -21,9 +21,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <errno.h> + #include <string.h> +@@ -35,7 +33,7 @@ + #include <sys/param.h> + #include <sys/types.h> + #include <sys/stat.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <sys/ioctl.h> + + #include "error.h" +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_execute.c lxc-0.9.0/src/lxc/lxc_execute.c +--- lxc-0.9.0.orig/src/lxc/lxc_execute.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_execute.c 2013-09-10 12:07:34.399998459 +0000 +@@ -20,7 +20,6 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + #include <errno.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_init.c lxc-0.9.0/src/lxc/lxc_init.c +--- lxc-0.9.0.orig/src/lxc/lxc_init.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_init.c 2013-09-10 12:07:34.409998459 +0000 +@@ -30,7 +30,6 @@ + #include <sys/stat.h> + #include <sys/types.h> + #include <sys/wait.h> +-#define _GNU_SOURCE + #include <getopt.h> + + #include "log.h" +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_restart.c lxc-0.9.0/src/lxc/lxc_restart.c +--- lxc-0.9.0.orig/src/lxc/lxc_restart.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_restart.c 2013-09-10 12:07:34.419998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <unistd.h> + #include <errno.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_start.c lxc-0.9.0/src/lxc/lxc_start.c +--- lxc-0.9.0.orig/src/lxc/lxc_start.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_start.c 2013-09-10 12:07:34.429998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <libgen.h> + #include <stdlib.h> + #include <unistd.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxc_unshare.c lxc-0.9.0/src/lxc/lxc_unshare.c +--- lxc-0.9.0.orig/src/lxc/lxc_unshare.c 2013-03-19 10:17:27.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxc_unshare.c 2013-09-10 12:07:34.439998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <stdlib.h> + #include <unistd.h> + #include <libgen.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxccontainer.c lxc-0.9.0/src/lxc/lxccontainer.c +--- lxc-0.9.0.orig/src/lxc/lxccontainer.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxccontainer.c 2013-09-10 12:21:27.039998297 +0000 +@@ -800,7 +800,7 @@ + if (pid < 0) + return false; + if (pid == 0) { // child +- ret = execlp("lxc-destroy", "lxc-destroy", "-n", c->name, "-P", c->config_path, NULL); ++ ret = execlp("lxc-destroy", "lxc-destroy", "-n", c->name, "-P", c->config_path, (void*)0); + perror("execl"); + exit(1); + } +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxclock.c lxc-0.9.0/src/lxc/lxclock.c +--- lxc-0.9.0.orig/src/lxc/lxclock.c 2013-03-19 10:17:26.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxclock.c 2013-09-10 12:20:50.019998304 +0000 +@@ -18,8 +18,8 @@ + */ + + #include "lxclock.h" +-#include <malloc.h> + #include <stdio.h> ++#include <stdlib.h> + + #define OFLAG (O_CREAT | O_RDWR) + #define SEMMODE 0660 +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/lxcutmp.c lxc-0.9.0/src/lxc/lxcutmp.c +--- lxc-0.9.0.orig/src/lxc/lxcutmp.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/lxcutmp.c 2013-09-10 12:29:25.499998205 +0000 +@@ -63,6 +63,8 @@ + #include "lxc.h" + #include "log.h" + ++#include <utmp.h> ++ + #ifndef __USE_GNU + #define __USE_GNU + #endif +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/network.c lxc-0.9.0/src/lxc/network.c +--- lxc-0.9.0.orig/src/lxc/network.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/network.c 2013-09-10 12:07:34.539998459 +0000 +@@ -20,7 +20,6 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> + #undef _GNU_SOURCe + #include <stdlib.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/parse.c lxc-0.9.0/src/lxc/parse.c +--- lxc-0.9.0.orig/src/lxc/parse.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/parse.c 2013-09-10 12:07:34.559998459 +0000 +@@ -20,9 +20,7 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +-#define _GNU_SOURCE + #include <stdio.h> +-#undef _GNU_SOURCE + #include <string.h> + #include <stdlib.h> + #include <errno.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/restart.c lxc-0.9.0/src/lxc/restart.c +--- lxc-0.9.0.orig/src/lxc/restart.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/restart.c 2013-09-10 12:07:34.559998459 +0000 +@@ -24,7 +24,6 @@ + #include "config.h" + + #include <stdio.h> +-#undef _GNU_SOURCE + #include <string.h> + #include <stdlib.h> + #include <errno.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/seccomp.c lxc-0.9.0/src/lxc/seccomp.c +--- lxc-0.9.0.orig/src/lxc/seccomp.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/seccomp.c 2013-09-10 12:07:34.579998459 +0000 +@@ -21,7 +21,6 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + #include <seccomp.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/start.c lxc-0.9.0/src/lxc/start.c +--- lxc-0.9.0.orig/src/lxc/start.c 2013-04-05 09:45:22.000000000 +0000 ++++ lxc-0.9.0/src/lxc/start.c 2013-09-10 12:10:30.929998424 +0000 +@@ -24,7 +24,6 @@ + #include "config.h" + + #include <stdio.h> +-#undef _GNU_SOURCE + #include <string.h> + #include <stdlib.h> + #include <dirent.h> +@@ -43,7 +42,7 @@ + #include <sys/types.h> + #include <sys/wait.h> + #include <sys/un.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <sys/syscall.h> + + #if HAVE_SYS_CAPABILITY_H +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/utils.c lxc-0.9.0/src/lxc/utils.c +--- lxc-0.9.0.orig/src/lxc/utils.c 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/utils.c 2013-09-10 12:07:34.629998459 +0000 +@@ -21,7 +21,6 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define _GNU_SOURCE + #include <errno.h> + #include <unistd.h> + #include <stdlib.h> +diff -x '*.Po' -ru lxc-0.9.0.orig/src/lxc/utils.h lxc-0.9.0/src/lxc/utils.h +--- lxc-0.9.0.orig/src/lxc/utils.h 2013-03-19 10:17:28.000000000 +0000 ++++ lxc-0.9.0/src/lxc/utils.h 2013-09-10 12:17:15.499998346 +0000 +@@ -23,6 +23,8 @@ + #ifndef _utils_h + #define _utils_h + ++#include <sys/types.h> ++ + extern int lxc_copy_file(const char *src, const char *dst); + extern int lxc_setup_fs(void); + extern int get_u16(unsigned short *val, const char *arg, int base); |