瀏覽代碼

symlink.c: Compile only if syscall is available

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 14 年之前
父節點
當前提交
c292baef29
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      libc/sysdeps/linux/common/symlink.c

+ 3 - 2
libc/sysdeps/linux/common/symlink.c

@@ -8,7 +8,8 @@
  */
 
 #include <sys/syscall.h>
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
-#include <unistd.h>
+
+#if defined __NR_symlink && (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K)
+# include <unistd.h>
 _syscall2(int, symlink, const char *, oldpath, const char *, newpath)
 #endif