diff options
Diffstat (limited to 'usr/src/lib/libbc/libc/sys/common/dup.c')
-rw-r--r-- | usr/src/lib/libbc/libc/sys/common/dup.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/lib/libbc/libc/sys/common/dup.c b/usr/src/lib/libbc/libc/sys/common/dup.c index 3445f278b2..1f7a5dddc1 100644 --- a/usr/src/lib/libbc/libc/sys/common/dup.c +++ b/usr/src/lib/libbc/libc/sys/common/dup.c @@ -20,20 +20,19 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int dup(int fd) { int ret, fds; - if ((ret = _syscall(SYS_dup, fd)) == -1) + if ((ret = _syscall(SYS_fcntl, fd, F_DUPFD, 0)) == -1) return (-1); if ((fds = fd_get(fd)) != -1) |