소스 검색

Fix bug from the syscall reorganization, detected by python's test_poll.py.
The #ifdef __NR_poll test was failing because it was done before any includes.
Hence, the emulation was always being used.

NOTE: The emulation fails a couple of tests in test_poll.py!

Manuel Novoa III 22 년 전
부모
커밋
17c21765b4
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      libc/sysdeps/linux/common/poll.c

+ 3 - 3
libc/sysdeps/linux/common/poll.c

@@ -17,16 +17,16 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifdef __NR_poll
-
 #include "syscalls.h"
 #include <sys/poll.h>
+
+#ifdef __NR_poll
+
 _syscall3(int, poll, struct pollfd *, fds,
 	unsigned long int, nfds, int, timeout);
 #else
 
 #include <alloca.h>
-#include <sys/poll.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <string.h>