Created attachment 169907 [details] patch for shmget(2) Hi, shmget(2) man page says to include sys/types.h which is not necessary. Instead sys/stat.h should be used because it contains S_IRUSR (and others). Without sys/stat.h the compiler throws an error: sgt.c:7:37: error: use of undeclared identifier 'S_IRUSR' I have attached the patch. BR, Marko
Hi, can anybody confirm this? Maybe the definitions of S_IRUSR (and others) should be moved to some other include file? -Marko
(In reply to mt from comment #1) You're right, sys/stat.h is needed. But sys/types.h is also needed. It's defined in the correct location as per http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysstat.h.html
A commit references this bug: Author: sevan Date: Sat Aug 12 17:46:51 UTC 2017 New revision: 322432 URL: https://svnweb.freebsd.org/changeset/base/322432 Log: Add missing header. S_IRUSR is defined in sys/stat.h PR: 209229 Submitted by: <mt AT markoturk DOT info> Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D12007 Changes: head/lib/libc/sys/shmget.2
Committed, thanks for the patch & apologies for the delay.