Skip to content

Commit

Permalink
Fixes for NetBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
mato authored and yallop committed Aug 17, 2016
1 parent 2bf03fb commit 391feb7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ctypes/posix_types_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@
#define EXPOSE_ALIGNMENT(X) EXPOSE_ALIGNMENT_COMMON(X, X)
#define EXPOSE_ALIGNMENT_S(X) EXPOSE_ALIGNMENT_COMMON(X, UNDERSCORE(X))

#ifdef __NetBSD__
/* NetBSD defines these types as macros, which expands to the wrong thing
* in the EXPOSE_* macros above. I have no idea how to prevent cpp from
* expanding macro arguments, so just hack around it for now. */
#undef off_t
#undef mode_t
#undef pid_t
typedef __off_t off_t;
typedef __mode_t mode_t;
typedef __pid_t pid_t;
#endif

EXPOSE_TYPEINFO(clock_t)
EXPOSE_TYPEINFO_S(dev_t)
EXPOSE_TYPEINFO_S(ino_t)
Expand Down

0 comments on commit 391feb7

Please sign in to comment.