summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-04-08 02:21:44 +0000
committerkib <kib@FreeBSD.org>2015-04-08 02:21:44 +0000
commitce64a546a52ef08136ffd75e79330a65dc1e6c28 (patch)
tree3dcc27f53c429235e4a73da87e4147889e2cf98a /lib
parente5886b520a9b363350787735e15fcff6b2b69b8a (diff)
downloadFreeBSD-src-ce64a546a52ef08136ffd75e79330a65dc1e6c28.zip
FreeBSD-src-ce64a546a52ef08136ffd75e79330a65dc1e6c28.tar.gz
MFC r280959:
Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/include/compat.h9
-rw-r--r--lib/libc/sys/fcntl.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h
index 7694540..2b8f0de 100644
--- a/lib/libc/include/compat.h
+++ b/lib/libc/include/compat.h
@@ -44,5 +44,14 @@ __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0);
#undef __sym_compat
+#define __weak_reference(sym,alias) \
+ .weak alias;.equ alias,sym
+
+#ifndef SYSCALL_COMPAT
+__weak_reference(__sys_fcntl,__fcntl_compat)
+#endif
+
+#undef __weak_reference
+
#endif /* __LIBC_COMPAT_H__ */
diff --git a/lib/libc/sys/fcntl.c b/lib/libc/sys/fcntl.c
index 4cb887b..7af617e 100644
--- a/lib/libc/sys/fcntl.c
+++ b/lib/libc/sys/fcntl.c
@@ -103,7 +103,4 @@ __fcntl_compat(int fd, int cmd, ...)
return (__sys_fcntl(fd, cmd, arg));
}
}
-#else
-__weak_reference(__sys_fcntl, __fcntl_compat);
-__weak_reference(__sys_fcntl, __fcntl);
#endif
OpenPOWER on IntegriCloud