From owner-svn-src-all@FreeBSD.ORG Mon Mar 9 02:34:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 844F31065672; Mon, 9 Mar 2009 02:34:02 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 727878FC0A; Mon, 9 Mar 2009 02:34:02 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n292Y29x006915; Mon, 9 Mar 2009 02:34:02 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n292Y2aC006913; Mon, 9 Mar 2009 02:34:02 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <200903090234.n292Y2aC006913@svn.freebsd.org> From: David Xu Date: Mon, 9 Mar 2009 02:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189549 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 02:34:02 -0000 Author: davidxu Date: Mon Mar 9 02:34:02 2009 New Revision: 189549 URL: http://svn.freebsd.org/changeset/base/189549 Log: Don't reference non-existent __fcntl_compat if WITHOUT_SYSCALL_COMPAT is defined. Submitted by: Pawel Worach "pawel dot worach at gmail dot com" Modified: head/lib/libthr/Makefile head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Sun Mar 8 23:45:56 2009 (r189548) +++ head/lib/libthr/Makefile Mon Mar 9 02:34:02 2009 (r189549) @@ -51,4 +51,8 @@ SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthr SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif +.if !defined(WITHOUT_SYSCALL_COMPAT) +CFLAGS+=-DSYSCALL_COMPAT +.endif + .include Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sun Mar 8 23:45:56 2009 (r189548) +++ head/lib/libthr/thread/thr_syscalls.c Mon Mar 9 02:34:02 2009 (r189549) @@ -132,7 +132,9 @@ int __aio_suspend(const struct aiocb * c 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);