diff options
author | davidxu <davidxu@FreeBSD.org> | 2009-03-09 02:34:02 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2009-03-09 02:34:02 +0000 |
commit | 2adf4999ea9b13a2eb8ace79f6e205664aa62625 (patch) | |
tree | 074bdd3c5e68d9b14097468c5426d59642acab9b /lib/libthr | |
parent | 094f090e7f647daca1ff4c522899def7eae6c6b3 (diff) | |
download | FreeBSD-src-2adf4999ea9b13a2eb8ace79f6e205664aa62625.zip FreeBSD-src-2adf4999ea9b13a2eb8ace79f6e205664aa62625.tar.gz |
Don't reference non-existent __fcntl_compat if WITHOUT_SYSCALL_COMPAT is defined.
Submitted by: Pawel Worach "pawel dot worach at gmail dot com"
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/Makefile | 4 | ||||
-rw-r--r-- | lib/libthr/thread/thr_syscalls.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 8f21ce5..eba30d8 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -51,4 +51,8 @@ SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif +.if !defined(WITHOUT_SYSCALL_COMPAT) +CFLAGS+=-DSYSCALL_COMPAT +.endif + .include <bsd.lib.mk> diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index e3d9fd9..3944376 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -132,7 +132,9 @@ int __aio_suspend(const struct aiocb * const iocbs[], int, int __close(int); int __connect(int, const struct sockaddr *, socklen_t); int __fcntl(int, int,...); +#ifdef SYSCALL_COMPAT extern int __fcntl_compat(int, int,...); +#endif int __fsync(int); int __msync(void *, size_t, int); int __nanosleep(const struct timespec *, struct timespec *); @@ -253,7 +255,11 @@ __fcntl(int fd, int cmd,...) ret = __sys_fcntl(fd, cmd); break; default: +#ifdef SYSCALL_COMPAT ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); +#else + ret = EOPNOTSUPP; +#endif } va_end(ap); |