Subject: kern/5076: FD_ZERO macro def missing include
To: None <gnats-bugs@gnats.netbsd.org>
From: matt debergalis <deberg@mit.edu>
List: netbsd-bugs
Date: 02/26/1998 22:26:50
>Number: 5076
>Category: kern
>Synopsis: FD_ZERO/FD_COPY require extra include
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 26 19:35:01 1998
>Last-Modified:
>Originator: matt debergalis
>Organization:
matt debergalis <deberg@mit.edu, deberg@ai.mit.edu>
finger deberg@ai.mit.edu for PGP key
>Release: 1.3
>Environment:
System: NetBSD skyland 1.3 NetBSD 1.3 (SKYLAND) #31: Sat Feb 21 16:25:33 EST 1998 deberg@skyland:/u1/usr/src/sys/arch/i386/compile/SKYLAND i386
>Description:
The manpage for select lists three necessary include files:
unistd.h, sys/types.h, and sys/time.h. Included in sys/types.h are the
related macros FD_SET, FD_CLR, FD_ISSET, FD_COPY, and FD_ZERO. FD_COPY
and FD_ZERO are defined using memcpy and memset, which are prototyped
in string.h. Since string.h isn't included by sys/types.h, programs
must explicitly include string.h.
>How-To-Repeat:
Write such a program, build with -Wall, observe compiler
warning.
>Fix:
Either update the select manpage to list string.h, or include
string.h from sys/types.h.
>Audit-Trail:
>Unformatted: