465e6b
From cb21b73e859de77804dde8579c6d1d1f84eec3a6 Mon Sep 17 00:00:00 2001
465e6b
From: Adrian Reber <areber@redhat.com>
465e6b
Date: Thu, 28 Sep 2017 09:13:33 +0000
465e6b
Subject: [PATCH] fix building on newest glibc and kernel
465e6b
465e6b
On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
465e6b
glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
465e6b
465e6b
In file included from /usr/include/linux/aio_abi.h:31:0,
465e6b
                 from criu/cr-check.c:24:
465e6b
/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
465e6b
   MS_RDONLY = 1,  /* Mount read-only.  */
465e6b
   ^
465e6b
make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
465e6b
make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
465e6b
make: *** [Makefile:233: criu] Error 2
465e6b
465e6b
This simple re-ordering of includes fixes it for me.
465e6b
465e6b
Signed-off-by: Adrian Reber <areber@redhat.com>
465e6b
---
465e6b
 criu/cr-check.c | 2 +-
465e6b
 1 file changed, 1 insertion(+), 1 deletion(-)
465e6b
465e6b
diff --git a/criu/cr-check.c b/criu/cr-check.c
465e6b
index 5dd448b..8986ec4 100644
465e6b
--- a/criu/cr-check.c
465e6b
+++ b/criu/cr-check.c
465e6b
@@ -21,8 +21,8 @@
465e6b
 #include <netinet/in.h>
465e6b
 #include <sys/prctl.h>
465e6b
 #include <sched.h>
465e6b
-#include <linux/aio_abi.h>
465e6b
 #include <sys/mount.h>
465e6b
+#include <linux/aio_abi.h>
465e6b
 
465e6b
 #include "../soccr/soccr.h"
465e6b
 
465e6b
-- 
465e6b
1.8.3.1
465e6b