Browse Source

Fix include in resource.h and add SIZE_MAX

The rusage struct makes use of the timeval structure. Make sure to
include sys/time.h so that the type is known.

Add SIZE_MAX to stdint.h

sys/resource expects the defined structures to not be defined with a
typedef.
Dan Robertson 7 years ago
parent
commit
cc5669939e
2 changed files with 4 additions and 1 deletions
  1. 2 0
      include/stdint.h
  2. 2 1
      src/resource/cbindgen.toml

+ 2 - 0
include/stdint.h

@@ -49,4 +49,6 @@ typedef int64_t intmax_t;
 #define UINTMAX_MAX UINT64_MAX
 typedef uint64_t uintmax_t;
 
+#define SIZE_MAX UINT64_MAX
+
 #endif /* _STDINT_H */

+ 2 - 1
src/resource/cbindgen.toml

@@ -1,6 +1,7 @@
-sys_includes = ["sys/types.h"]
+sys_includes = ["sys/types.h", "sys/time.h"]
 include_guard = "_SYS_RESOURCE_H"
 language = "C"
+style = "Tag"
 
 [enum]
 prefix_with_name = true