From cc5669939e8514653d1239d0a9be7d23c82df6fb Mon Sep 17 00:00:00 2001
From: Dan Robertson <danlrobertson89@gmail.com>
Date: Sun, 11 Mar 2018 22:12:24 +0000
Subject: [PATCH] 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.
---
 include/stdint.h           | 2 ++
 src/resource/cbindgen.toml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/stdint.h b/include/stdint.h
index ade0ab4f..faf36934 100644
--- a/include/stdint.h
+++ b/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 */
diff --git a/src/resource/cbindgen.toml b/src/resource/cbindgen.toml
index f9c595b6..788d1055 100644
--- a/src/resource/cbindgen.toml
+++ b/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
-- 
GitLab