opensolaris compat: fix compile error

when opensolaris/sys/types.h is included before stddef.h ptrdiff_t
would be typedef'd twice
This commit is contained in:
Matt Macy 2018-07-03 23:45:02 +00:00
parent 6e34355671
commit 1abd10a2ea

View File

@ -72,7 +72,10 @@ typedef u_int minor_t;
typedef short index_t;
typedef off_t offset_t;
typedef long ptrdiff_t; /* pointer difference */
#ifndef _PTRDIFF_T_DECLARED
typedef __ptrdiff_t ptrdiff_t; /* pointer difference */
#define _PTRDIFF_T_DECLARED
#endif
typedef int64_t rlim64_t;
typedef int major_t;