Kaynağa Gözat

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 20 yıl önce
ebeveyn
işleme
17c21765b4
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  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>