Created attachment 169907 [details]
patch for shmget(2)
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.
can anybody confirm this?
Maybe the definitions of S_IRUSR (and others) should be moved to some other include file?
(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:
Date: Sat Aug 12 17:46:51 UTC 2017
New revision: 322432
Add missing header.
S_IRUSR is defined in sys/stat.h
Submitted by: <mt AT markoturk DOT info>
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D12007
Committed, thanks for the patch & apologies for the delay.