Summary: | /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | TOGAWA Satoshi <toga> | ||||
Component: | misc | Assignee: | Mike Barcroft <mike> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Unspecified | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
TOGAWA Satoshi
2000-09-29 11:10:04 UTC
*** /usr/include/sys/mman.h Thu Jul 27 12:06:39 2000 --- ./mman.h Fri Sep 29 18:59:47 2000 *************** *** 129,134 **** --- 129,135 ---- __BEGIN_DECLS #ifdef _P1003_1B_VISIBLE + #include <sys/types.h> int mlockall __P((int)); int munlockall __P((void)); int shm_open __P((const char *, int, mode_t)); On Fri, Sep 29, 2000 at 03:05:19AM -0700, toga@puyo.org wrote: > >Synopsis: /usr/include/sys/mman.h uses a type defined in /usr/include/sys/types.h [snip] > >Description: > In /usr/include/sys/mman.h , > > line 134 > int shm_open __P((const char *, int, mode_t)); > > but type "mode_t" is defined in /usr/include/sys/types.h. > And mman.h don't include types.h. So using mman.h, without > including types.h, causes compile error. Uhm.. the shm_open(3) manpage lists both <sys/types.h> and <sys/mman.h> as headers you should include when using shm_open(). That is, on FreeBSD, this is a well documented header dependency. It is true, though, that SUSv2 says shm_open() should only need <sys/mman.h> - http://www.opengroup.org/onlinepubs/007908799/xsh/shm_open.html G'luck, Peter -- This sentence contains exactly threee erors. Responsible Changed From-To: freebsd-bugs->freebsd-standards Apperently SUSv2 thinks this should be changed. Responsible Changed From-To: freebsd-standards->mike Over to me. State Changed From-To: open->closed Fixed in 5.0-CURRENT. No plans to MFC. |