[v5,18/35] fcntl.2: Remove unused include

Message ID 20210404115847.78166-19-alx.manpages@gmail.com
State New
Headers show
Series
  • Untitled series #36401
Related show

Commit Message

Alejandro Colomar via Libc-alpha April 4, 2021, 11:58 a.m.
I couldn't find a reason for including <unistd.h>.  All the macros
used by fcntl() are defined in <fcntl.h>.  For comparison, FreeBSD
and OpenBSD don't specify <unistd.h> in their manual pages.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/fcntl.2 | 1 -
 1 file changed, 1 deletion(-)

-- 
2.31.0

Comments

Alejandro Colomar via Libc-alpha April 5, 2021, 10:44 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> I couldn't find a reason for including <unistd.h>.  All the macros

> used by fcntl() are defined in <fcntl.h>.  For comparison, FreeBSD

> and OpenBSD don't specify <unistd.h> in their manual pages.

> 

> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>



Patch applied.

Thanks,

Michael


> ---

>  man2/fcntl.2 | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/man2/fcntl.2 b/man2/fcntl.2

> index de87eec1f..7b5604e3a 100644

> --- a/man2/fcntl.2

> +++ b/man2/fcntl.2

> @@ -69,7 +69,6 @@

>  fcntl \- manipulate file descriptor

>  .SH SYNOPSIS

>  .nf

> -.B #include <unistd.h>

>  .B #include <fcntl.h>

>  .PP

>  .BI "int fcntl(int " fd ", int " cmd ", ... /* " arg " */ );"

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man2/fcntl.2 b/man2/fcntl.2
index de87eec1f..7b5604e3a 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -69,7 +69,6 @@ 
 fcntl \- manipulate file descriptor
 .SH SYNOPSIS
 .nf
-.B #include <unistd.h>
 .B #include <fcntl.h>
 .PP
 .BI "int fcntl(int " fd ", int " cmd ", ... /* " arg " */ );"