From: Matthew Fortune Date: Tue, 23 Feb 2016 16:09:15 +0000 (+0000) Subject: migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD X-Git-Tag: TizenStudio_2.0_p2.4~27^2~6^2~8^2~149^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8b9d7719cf6fb3186ecc817b3c04005eb1a1f01;p=sdk%2Femulator%2Fqemu.git migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD sys/eventfd.h was being guarded only by a check for linux but does not exist on older distributions like CentOS 5. Move the include into the code that uses it and add an appropriate guard. Signed-off-by: Matthew Fortune Reviewed-by: Juan Quintela Message-Id: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> Signed-off-by: Amit Shah --- diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 254c629..fbd0064 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -52,14 +52,14 @@ struct PostcopyDiscardState { #if defined(__linux__) #include -#include #include #include #include #include /* for __u64 */ #endif -#if defined(__linux__) && defined(__NR_userfaultfd) +#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD) +#include #include static bool ufd_version_check(int ufd)