Christopher Zimmermann wrote on misc@, Wed, Feb 24, 2010 at 08:53:28PM +0100:
> I just got some errors while trying to compile ptlib: > > error: type specifier omitted for parameter `size_t' > [...] > > They resulted from size_t not being defined in sys/mmap.h I guess you are talking about <sys/mman.h>. > I could fix this problem by including sys/types.h instead > of sys/cdefs.h in sys/mmap.h I don't understand why <sys/cdefs.h> might be needed in <sys/types.h>, but i don't feel qualified to propose its removal either. Maybe it is needed for something. > Is this a problem of ptlib, which should not directly > include mmap.h or should this possibly be fixed in OpenBSD? In OpenBSD, we usually include headers in other headers if that is required by a relevant standard, in particular by POSIX. Now, <sys/mman.h> is specified by POSIX, and it says: "The <sys/mman.h> header shall define the mode_t, off_t, and size_t types as described in <sys/types.h>." Thus, I do think you have a point, and <sys/types.h> is indeed missing from <sys/mman.h> and should be added. I won't touch this stuff though without very clear OKs from the right people, in particular around this time of the year. Index: mman.h =================================================================== RCS file: /cvs/src/sys/sys/mman.h,v retrieving revision 1.18 diff -u -r1.18 mman.h --- mman.h 21 Jul 2003 22:52:19 -0000 1.18 +++ mman.h 24 Feb 2010 20:52:56 -0000 @@ -107,6 +107,7 @@ #ifndef _KERNEL #include <sys/cdefs.h> +#include <sys/types.h> __BEGIN_DECLS /* Some of these int's should probably be size_t's */