summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_syscalls.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-04-18 21:50:13 +0000
committerkib <kib@FreeBSD.org>2015-04-18 21:50:13 +0000
commit2254748ed0eebd8391a1bc331f3d54d0ddb1f69d (patch)
tree5939add2a0816746476989dd37677ad0fb0428ac /lib/libthr/thread/thr_syscalls.c
parent2b1ec4f62f3bd13a47fea3a9c366c9a7a0ac35e0 (diff)
downloadFreeBSD-src-2254748ed0eebd8391a1bc331f3d54d0ddb1f69d.zip
FreeBSD-src-2254748ed0eebd8391a1bc331f3d54d0ddb1f69d.tar.gz
The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and
pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time. Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code. Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already. Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims. Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'lib/libthr/thread/thr_syscalls.c')
-rw-r--r--lib/libthr/thread/thr_syscalls.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index 2484e52..7c05697 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -95,10 +95,6 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "thr_private.h"
-#ifdef SYSCALL_COMPAT
-extern int __fcntl_compat(int, int, ...);
-#endif
-
static int
__thr_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
{
@@ -203,18 +199,10 @@ __thr_fcntl(int fd, int cmd, ...)
va_start(ap, cmd);
if (cmd == F_OSETLKW || cmd == F_SETLKW) {
_thr_cancel_enter(curthread);
-#ifdef SYSCALL_COMPAT
- ret = __fcntl_compat(fd, cmd, va_arg(ap, void *));
-#else
ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
-#endif
_thr_cancel_leave(curthread, ret == -1);
} else {
-#ifdef SYSCALL_COMPAT
- ret = __fcntl_compat(fd, cmd, va_arg(ap, void *));
-#else
ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
-#endif
}
va_end(ap);
OpenPOWER on IntegriCloud