Index: lib/libthr/thread/thr_syscalls.c =================================================================== --- lib/libthr/thread/thr_syscalls.c (revision 189300) +++ lib/libthr/thread/thr_syscalls.c (working copy) @@ -132,7 +132,9 @@ 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 @@ 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); Index: lib/libthr/Makefile =================================================================== --- lib/libthr/Makefile (revision 189300) +++ lib/libthr/Makefile (working copy) @@ -51,4 +51,8 @@ SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif +.if !defined(WITHOUT_SYSCALL_COMPAT) +CFLAGS+=-DSYSCALL_COMPAT +.endif + .include