blob: 9361adc26d6eb590db63a45f1d79f78796e8628c [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From b59947007362b53e9f41f1e5a33071dedf1c59ac Mon Sep 17 00:00:00 2001
2From: Adrian Reber <areber@redhat.com>
3Date: Thu, 28 Sep 2017 09:13:33 +0000
4Subject: [PATCH] fix building on newest glibc and kernel
5
6On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
7glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
8
9In 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 ^
14make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
15make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
16make: *** [Makefile:233: criu] Error 2
17
18This simple re-ordering of includes fixes it for me.
19
20Signed-off-by: Adrian Reber <areber@redhat.com>
21Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
22
23Upstream-Status: Backport
24[https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
25
26Signed-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
32diff --git a/criu/cr-check.c b/criu/cr-check.c
33index 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