summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-16 12:17:41 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:39 +0200
commitc292baef29b746ba55418757c5efd0d8b78be59a (patch)
tree05f38f24d941fddbbb2fb611c48ae0fec1b8a0a5 /libc
parent7dc2d2ddee6985c67a91a84124d351d078d29737 (diff)
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>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/symlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/symlink.c b/libc/sysdeps/linux/common/symlink.c
index e53e8d413..15a576d70 100644
--- a/libc/sysdeps/linux/common/symlink.c
+++ b/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