dup.2: SYNOPSIS: Add "#include <fntl.h>" for O_* constants

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-02-14 10:19:54 +13:00
parent 509b5e8b73
commit d5563c9427
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,7 @@
.\" details for dup2().
.\" 2008-10-09, mtk: add description of dup3()
.\"
.TH DUP 2 2010-09-10 "Linux" "Linux Programmer's Manual"
.TH DUP 2 2012-02-14 "Linux" "Linux Programmer's Manual"
.SH NAME
dup, dup2, dup3 \- duplicate a file descriptor
.SH SYNOPSIS
@ -44,6 +44,7 @@ dup, dup2, dup3 \- duplicate a file descriptor
.BI "int dup2(int " oldfd ", int " newfd );
.sp
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.BR "#include <fcntl.h>" " /* Obtain O_* constant definitions */
.B #include <unistd.h>
.sp
.BI "int dup3(int " oldfd ", int " newfd ", int " flags );