瀏覽代碼

Add back explicit prototype, archs miss sys/io.h, remove m68k exclusion

Peter S. Mazinger 19 年之前
父節點
當前提交
6167a20f66
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 2 1
      libc/sysdeps/linux/common/ioperm.c
  2. 3 3
      libc/sysdeps/linux/common/iopl.c

+ 2 - 1
libc/sysdeps/linux/common/ioperm.c

@@ -9,6 +9,7 @@
 
 #include "syscalls.h"
 #if defined __ARCH_HAS_MMU__ && defined __NR_ioperm
-#include <sys/io.h>
+/* psm: can't #include <sys/io.h>, some archs miss it */
+extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
 _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
 #endif

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

@@ -8,8 +8,8 @@
  */
 
 #include "syscalls.h"
-/* Tuns out the m68k unistd.h kernel header is broken */
-#if defined __ARCH_HAS_MMU__ && defined __NR_iopl && ( !defined(__mc68000__))
-#include <sys/io.h>
+#if defined __ARCH_HAS_MMU__ && defined __NR_iopl
+/* psm: can't #include <sys/io.h>, some archs miss it */
+extern int iopl(int __level) __THROW;
 _syscall1(int, iopl, int, level);
 #endif