Port: Add OSX clock_gettime compat
[lttng-tools.git] / tests / regression / kernel / select_poll_epoll.c
index 592fbcab8809223ffb2104572566eb423c22f1f9..4b703b38039f60ac9ad146ca750d60af743e1a3f 100644 (file)
@@ -17,7 +17,7 @@
 #include <limits.h>
 #include <pthread.h>
 #include <sys/mman.h>
-#include <time.h>
+#include <common/compat/time.h>
 
 #define BUF_SIZE 256
 #define NB_FD 1
@@ -442,7 +442,7 @@ void ppoll_fds_ulong_max(void)
  */
 void pselect_fd_too_big(void)
 {
-       fd_set rfds;
+       long rfds[2048 / (sizeof(long) * CHAR_BIT)] = { 0 };
        int ret;
        int fd2;
        char buf[BUF_SIZE];
@@ -456,9 +456,8 @@ void pselect_fd_too_big(void)
                perror("dup2");
                return;
        }
-       FD_ZERO(&rfds);
-       FD_SET(fd2, &rfds);
 
+       FD_SET(fd2, (fd_set *) &rfds);
        ret = syscall(SYS_pselect6, fd2 + 1, &rfds, NULL, NULL, NULL, NULL);
 
        if (ret == -1) {
This page took 0.024807 seconds and 5 git commands to generate.