summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-02-20 06:39:39 -0700
committerJens Axboe <axboe@kernel.dk>2022-02-20 06:39:39 -0700
commit194581752704831fd7a4733f7ad1aa72237d7b5a (patch)
tree0633f57e2bf1cad99dfb7ab8bdb235306a6454be
parent37856ad78b605a388b7ae598a55544c7c6d3abe5 (diff)
parent37a53a1d211ab8c33b7ed8b8f075061d73955220 (diff)
downloadliburing-194581752704831fd7a4733f7ad1aa72237d7b5a.tar.gz
liburing-194581752704831fd7a4733f7ad1aa72237d7b5a.tar.bz2
Merge branch 'alpine-linux-compile-fix' of https://github.com/mrakh/liburing
* 'alpine-linux-compile-fix' of https://github.com/mrakh/liburing: Fix warnings/errors when compiling on Alpine Linux
-rw-r--r--examples/ucontext-cp.c2
-rw-r--r--src/include/liburing.h1
-rw-r--r--test/eventfd-disable.c2
-rw-r--r--test/eventfd-reg.c2
-rw-r--r--test/eventfd-ring.c2
-rw-r--r--test/eventfd.c2
-rw-r--r--test/io-cancel.c2
-rw-r--r--test/io_uring_register.c3
-rw-r--r--test/iopoll.c2
-rw-r--r--test/link-timeout.c2
-rw-r--r--test/multicqes_drain.c2
-rw-r--r--test/poll-cancel-ton.c4
-rw-r--r--test/poll-cancel.c4
-rw-r--r--test/poll-many.c2
-rw-r--r--test/poll-mshot-update.c2
-rw-r--r--test/poll-ring.c2
-rw-r--r--test/poll-v-poll.c2
-rw-r--r--test/poll.c2
-rw-r--r--test/read-write.c2
-rw-r--r--test/register-restrictions.c2
-rw-r--r--test/ring-leak2.c2
-rw-r--r--test/sendmsg_fs_cve.c1
-rw-r--r--test/short-read.c2
-rw-r--r--test/shutdown.c1
-rw-r--r--test/sigfd-deadlock.c2
-rw-r--r--test/sq-poll-dup.c2
-rw-r--r--test/sq-poll-kthread.c2
-rw-r--r--test/sq-poll-share.c2
-rw-r--r--test/sqpoll-exit-hang.c2
-rw-r--r--test/thread-exit.c2
30 files changed, 33 insertions, 29 deletions
diff --git a/examples/ucontext-cp.c b/examples/ucontext-cp.c
index ea0c934..281013f 100644
--- a/examples/ucontext-cp.c
+++ b/examples/ucontext-cp.c
@@ -16,7 +16,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/timerfd.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "liburing.h"
#define QD 64
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 3050fcc..c6f3cb8 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -7,6 +7,7 @@
#endif
#include <sys/socket.h>
+#include <sys/stat.h>
#include <sys/uio.h>
#include <errno.h>
#include <signal.h>
diff --git a/test/eventfd-disable.c b/test/eventfd-disable.c
index f172fd7..6567be0 100644
--- a/test/eventfd-disable.c
+++ b/test/eventfd-disable.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include "liburing.h"
diff --git a/test/eventfd-reg.c b/test/eventfd-reg.c
index c708a51..b447455 100644
--- a/test/eventfd-reg.c
+++ b/test/eventfd-reg.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include "liburing.h"
diff --git a/test/eventfd-ring.c b/test/eventfd-ring.c
index 67e102c..d217312 100644
--- a/test/eventfd-ring.c
+++ b/test/eventfd-ring.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include "liburing.h"
diff --git a/test/eventfd.c b/test/eventfd.c
index 1a7e3f3..5c49ece 100644
--- a/test/eventfd.c
+++ b/test/eventfd.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include "liburing.h"
diff --git a/test/io-cancel.c b/test/io-cancel.c
index c1df0df..89bb31a 100644
--- a/test/io-cancel.c
+++ b/test/io-cancel.c
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "helpers.h"
#include "liburing.h"
diff --git a/test/io_uring_register.c b/test/io_uring_register.c
index b8a4ea5..eaed2dd 100644
--- a/test/io_uring_register.c
+++ b/test/io_uring_register.c
@@ -628,7 +628,8 @@ main(int argc, char **argv)
return 1;
}
mlock_limit = rlim.rlim_cur;
- printf("RELIMIT_MEMLOCK: %lu (%lu)\n", rlim.rlim_cur, rlim.rlim_max);
+ printf("RELIMIT_MEMLOCK: %llu (%llu)\n", (unsigned long long) rlim.rlim_cur,
+ (unsigned long long) rlim.rlim_max);
devnull = open("/dev/null", O_RDWR);
if (devnull < 0) {
perror("open /dev/null");
diff --git a/test/iopoll.c b/test/iopoll.c
index 4bfc26a..fec9d18 100644
--- a/test/iopoll.c
+++ b/test/iopoll.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include <sys/resource.h>
#include "helpers.h"
diff --git a/test/link-timeout.c b/test/link-timeout.c
index c8c289c..ad638e9 100644
--- a/test/link-timeout.c
+++ b/test/link-timeout.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "liburing.h"
diff --git a/test/multicqes_drain.c b/test/multicqes_drain.c
index 148cdd7..ff6fa7d 100644
--- a/test/multicqes_drain.c
+++ b/test/multicqes_drain.c
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "liburing.h"
diff --git a/test/poll-cancel-ton.c b/test/poll-cancel-ton.c
index 1c4234b..b023394 100644
--- a/test/poll-cancel-ton.c
+++ b/test/poll-cancel-ton.c
@@ -9,9 +9,9 @@
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/wait.h>
-#include <sys/signal.h>
+#include <signal.h>
#include "liburing.h"
diff --git a/test/poll-cancel.c b/test/poll-cancel.c
index 6bddc6c..0714a80 100644
--- a/test/poll-cancel.c
+++ b/test/poll-cancel.c
@@ -9,9 +9,9 @@
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/wait.h>
-#include <sys/signal.h>
+#include <signal.h>
#include "liburing.h"
diff --git a/test/poll-many.c b/test/poll-many.c
index 3f8d08d..dfbeeab 100644
--- a/test/poll-many.c
+++ b/test/poll-many.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/resource.h>
#include <fcntl.h>
diff --git a/test/poll-mshot-update.c b/test/poll-mshot-update.c
index d06699a..caedb6f 100644
--- a/test/poll-mshot-update.c
+++ b/test/poll-mshot-update.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/resource.h>
#include <fcntl.h>
#include <pthread.h>
diff --git a/test/poll-ring.c b/test/poll-ring.c
index 1f69e20..2dd3ae6 100644
--- a/test/poll-ring.c
+++ b/test/poll-ring.c
@@ -10,7 +10,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "liburing.h"
diff --git a/test/poll-v-poll.c b/test/poll-v-poll.c
index c8ba6f1..1b277db 100644
--- a/test/poll-v-poll.c
+++ b/test/poll-v-poll.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <signal.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/wait.h>
#include <sys/select.h>
#include <pthread.h>
diff --git a/test/poll.c b/test/poll.c
index f9a89d0..1cd57ba 100644
--- a/test/poll.c
+++ b/test/poll.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/wait.h>
#include "liburing.h"
diff --git a/test/read-write.c b/test/read-write.c
index f505f93..3951a64 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include <sys/resource.h>
diff --git a/test/register-restrictions.c b/test/register-restrictions.c
index bcae67c..e1cf5bd 100644
--- a/test/register-restrictions.c
+++ b/test/register-restrictions.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include "liburing.h"
diff --git a/test/ring-leak2.c b/test/ring-leak2.c
index 77e7d82..a8c03fe 100644
--- a/test/ring-leak2.c
+++ b/test/ring-leak2.c
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <unistd.h>
#include <sys/eventfd.h>
diff --git a/test/sendmsg_fs_cve.c b/test/sendmsg_fs_cve.c
index 3866e5d..13a1235 100644
--- a/test/sendmsg_fs_cve.c
+++ b/test/sendmsg_fs_cve.c
@@ -20,6 +20,7 @@
#include <unistd.h>
#include <stdio.h>
+#include <string.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/un.h>
diff --git a/test/short-read.c b/test/short-read.c
index 02eee04..a6f2620 100644
--- a/test/short-read.c
+++ b/test/short-read.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "helpers.h"
diff --git a/test/shutdown.c b/test/shutdown.c
index 20bcc77..14c7407 100644
--- a/test/shutdown.c
+++ b/test/shutdown.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <string.h>
#include <assert.h>
#include <errno.h>
diff --git a/test/sigfd-deadlock.c b/test/sigfd-deadlock.c
index 038b094..277b342 100644
--- a/test/sigfd-deadlock.c
+++ b/test/sigfd-deadlock.c
@@ -8,7 +8,7 @@
#include <unistd.h>
#include <sys/signalfd.h>
#include <sys/epoll.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <stdio.h>
#include "liburing.h"
diff --git a/test/sq-poll-dup.c b/test/sq-poll-dup.c
index e688c9f..9596866 100644
--- a/test/sq-poll-dup.c
+++ b/test/sq-poll-dup.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include <sys/resource.h>
diff --git a/test/sq-poll-kthread.c b/test/sq-poll-kthread.c
index 0a0a75a..4bbf131 100644
--- a/test/sq-poll-kthread.c
+++ b/test/sq-poll-kthread.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/wait.h>
#include <sys/epoll.h>
diff --git a/test/sq-poll-share.c b/test/sq-poll-share.c
index 99227d5..2f1c1dd 100644
--- a/test/sq-poll-share.c
+++ b/test/sq-poll-share.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/eventfd.h>
#include <sys/resource.h>
diff --git a/test/sqpoll-exit-hang.c b/test/sqpoll-exit-hang.c
index 43385ce..e137c41 100644
--- a/test/sqpoll-exit-hang.c
+++ b/test/sqpoll-exit-hang.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
-#include <sys/poll.h>
+#include <poll.h>
#include "liburing.h"
static unsigned long long mtime_since(const struct timeval *s,
diff --git a/test/thread-exit.c b/test/thread-exit.c
index b26d4aa..3e20431 100644
--- a/test/thread-exit.c
+++ b/test/thread-exit.c
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <pthread.h>
#include "helpers.h"