Add stddef.h for POSIX ssize_t
Recent GCC versions / OS headers don't automatically provide ssize_t anymore, leading to compiler errors.
This commit is contained in:
parent
2330c177d3
commit
0ffd3fdae9
1 changed files with 5 additions and 1 deletions
|
|
@ -19,9 +19,13 @@
|
|||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
// ssize_t is not defined in stdint.h in MSVC.
|
||||
/* ssize_t is a POSIX type, not an ISO C one...
|
||||
* Windows seems to only have SSIZE_T in BaseTsd.h
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
typedef intmax_t ssize_t;
|
||||
#else
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
// Cross-platform macro ALIGNED_(x) aligns a struct by `x` bytes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue