2015-06-24 18:07:53 +02:00
|
|
|
Index: nginx-1.9.1/auto/unix
|
2014-01-30 07:19:31 +01:00
|
|
|
===================================================================
|
2015-06-24 18:07:53 +02:00
|
|
|
--- nginx-1.9.1.orig/auto/unix
|
|
|
|
+++ nginx-1.9.1/auto/unix
|
|
|
|
@@ -438,7 +438,11 @@ if [ $NGX_FILE_AIO = YES ]; then
|
|
|
|
ngx_feature="Linux AIO support (SYS_eventfd)"
|
|
|
|
ngx_feature_incs="#include <linux/aio_abi.h>
|
2014-01-30 07:19:31 +01:00
|
|
|
#include <sys/syscall.h>"
|
|
|
|
- ngx_feature_test="int n = SYS_eventfd;
|
|
|
|
+ ngx_feature_test="#ifdef SYS_eventfd
|
|
|
|
+ int n = SYS_eventfd;
|
|
|
|
+ #else
|
|
|
|
+ int n = SYS_eventfd2;
|
|
|
|
+ #endif
|
|
|
|
struct iocb iocb;
|
|
|
|
iocb.aio_lio_opcode = IOCB_CMD_PREAD;
|
|
|
|
iocb.aio_flags = IOCB_FLAG_RESFD;
|
2015-06-24 18:07:53 +02:00
|
|
|
Index: nginx-1.9.1/src/event/modules/ngx_epoll_module.c
|
2014-01-30 07:19:31 +01:00
|
|
|
===================================================================
|
2015-06-24 18:07:53 +02:00
|
|
|
--- nginx-1.9.1.orig/src/event/modules/ngx_epoll_module.c
|
|
|
|
+++ nginx-1.9.1/src/event/modules/ngx_epoll_module.c
|
|
|
|
@@ -76,9 +76,7 @@ int epoll_wait(int epfd, struct epoll_ev
|
2014-01-30 07:19:31 +01:00
|
|
|
|
|
|
|
#if (NGX_HAVE_FILE_AIO)
|
|
|
|
|
|
|
|
-#define SYS_io_setup 245
|
|
|
|
-#define SYS_io_destroy 246
|
|
|
|
-#define SYS_io_getevents 247
|
|
|
|
+#include <sys/syscall.h>
|
|
|
|
|
|
|
|
typedef u_int aio_context_t;
|
|
|
|
|
2015-06-24 18:07:53 +02:00
|
|
|
@@ -246,7 +244,11 @@ ngx_epoll_aio_init(ngx_cycle_t *cycle, n
|
|
|
|
#if (NGX_HAVE_SYS_EVENTFD_H)
|
|
|
|
ngx_eventfd = eventfd(0, 0);
|
|
|
|
#else
|
2014-01-30 07:19:31 +01:00
|
|
|
+#ifdef SYS_eventfd
|
|
|
|
ngx_eventfd = syscall(SYS_eventfd, 0);
|
|
|
|
+#else
|
|
|
|
+ ngx_eventfd = syscall(SYS_eventfd2, 0, 0);
|
|
|
|
+#endif
|
2015-06-24 18:07:53 +02:00
|
|
|
#endif
|
2014-01-30 07:19:31 +01:00
|
|
|
|
|
|
|
if (ngx_eventfd == -1) {
|