Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 1 | From b59947007362b53e9f41f1e5a33071dedf1c59ac Mon Sep 17 00:00:00 2001 |
| 2 | From: Adrian Reber <areber@redhat.com> |
| 3 | Date: Thu, 28 Sep 2017 09:13:33 +0000 |
| 4 | Subject: [PATCH] fix building on newest glibc and kernel |
| 5 | |
| 6 | On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64 |
| 7 | glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more: |
| 8 | |
| 9 | In file included from /usr/include/linux/aio_abi.h:31:0, |
| 10 | from criu/cr-check.c:24: |
| 11 | /usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant |
| 12 | MS_RDONLY = 1, /* Mount read-only. */ |
| 13 | ^ |
| 14 | make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1 |
| 15 | make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2 |
| 16 | make: *** [Makefile:233: criu] Error 2 |
| 17 | |
| 18 | This simple re-ordering of includes fixes it for me. |
| 19 | |
| 20 | Signed-off-by: Adrian Reber <areber@redhat.com> |
| 21 | Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> |
| 22 | |
| 23 | Upstream-Status: Backport |
| 24 | [https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db] |
| 25 | |
| 26 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
| 27 | |
| 28 | --- |
| 29 | criu/cr-check.c | 2 +- |
| 30 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 31 | |
| 32 | diff --git a/criu/cr-check.c b/criu/cr-check.c |
| 33 | index 1dd887a..93df2ab 100644 |
| 34 | --- a/criu/cr-check.c |
| 35 | +++ b/criu/cr-check.c |
| 36 | @@ -21,8 +21,8 @@ |
| 37 | #include <netinet/in.h> |
| 38 | #include <sys/prctl.h> |
| 39 | #include <sched.h> |
| 40 | -#include <linux/aio_abi.h> |
| 41 | #include <sys/mount.h> |
| 42 | +#include <linux/aio_abi.h> |
| 43 | |
| 44 | #include "../soccr/soccr.h" |
| 45 | |