diff mbox

aio-posix: Change CONFIG_EPOLL to CONFIG_EPOLL_CREATE1

Message ID 6D39441BF12EF246A7ABCE6654B023536BB85D08@hhmail02.hh.imgtec.org
State New
Headers show

Commit Message

Matthew Fortune Feb. 23, 2016, 3:42 p.m. UTC
CONFIG_EPOLL was being used to guard epoll_create1 which results
in build failures on CentOS 5.

Signed-off-by: Matthew Fortune <matthew.fortune@imgtec.com>
---
 aio-posix.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Fam Zheng Feb. 24, 2016, 12:31 a.m. UTC | #1
On Tue, 02/23 15:42, Matthew Fortune wrote:
> CONFIG_EPOLL was being used to guard epoll_create1 which results
> in build failures on CentOS 5.
> 
> Signed-off-by: Matthew Fortune <matthew.fortune@imgtec.com>
> ---
>  aio-posix.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/aio-posix.c b/aio-posix.c
> index fa7f8ab..7fd565f 100644
> --- a/aio-posix.c
> +++ b/aio-posix.c
> @@ -18,7 +18,7 @@
>  #include "block/block.h"
>  #include "qemu/queue.h"
>  #include "qemu/sockets.h"
> -#ifdef CONFIG_EPOLL
> +#ifdef CONFIG_EPOLL_CREATE1
>  #include <sys/epoll.h>
>  #endif
>  
> @@ -33,7 +33,7 @@ struct AioHandler
>      QLIST_ENTRY(AioHandler) node;
>  };
>  
> -#ifdef CONFIG_EPOLL
> +#ifdef CONFIG_EPOLL_CREATE1
>  
>  /* The fd number threashold to switch to epoll */
>  #define EPOLL_ENABLE_THRESHOLD 64
> @@ -483,7 +483,7 @@ bool aio_poll(AioContext *ctx, bool blocking)
>  
>  void aio_context_setup(AioContext *ctx, Error **errp)
>  {
> -#ifdef CONFIG_EPOLL
> +#ifdef CONFIG_EPOLL_CREATE1
>      assert(!ctx->epollfd);
>      ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
>      if (ctx->epollfd == -1) {
> -- 
> 2.2.1
> 

Reviewed-by: Fam Zheng <famz@redhat.com>
Stefan Hajnoczi Feb. 24, 2016, 1:51 p.m. UTC | #2
On Tue, Feb 23, 2016 at 03:42:14PM +0000, Matthew Fortune wrote:
> CONFIG_EPOLL was being used to guard epoll_create1 which results
> in build failures on CentOS 5.
> 
> Signed-off-by: Matthew Fortune <matthew.fortune@imgtec.com>
> ---
>  aio-posix.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan
diff mbox

Patch

diff --git a/aio-posix.c b/aio-posix.c
index fa7f8ab..7fd565f 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -18,7 +18,7 @@ 
 #include "block/block.h"
 #include "qemu/queue.h"
 #include "qemu/sockets.h"
-#ifdef CONFIG_EPOLL
+#ifdef CONFIG_EPOLL_CREATE1
 #include <sys/epoll.h>
 #endif
 
@@ -33,7 +33,7 @@  struct AioHandler
     QLIST_ENTRY(AioHandler) node;
 };
 
-#ifdef CONFIG_EPOLL
+#ifdef CONFIG_EPOLL_CREATE1
 
 /* The fd number threashold to switch to epoll */
 #define EPOLL_ENABLE_THRESHOLD 64
@@ -483,7 +483,7 @@  bool aio_poll(AioContext *ctx, bool blocking)
 
 void aio_context_setup(AioContext *ctx, Error **errp)
 {
-#ifdef CONFIG_EPOLL
+#ifdef CONFIG_EPOLL_CREATE1
     assert(!ctx->epollfd);
     ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
     if (ctx->epollfd == -1) {