summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2018-12-10 15:10:58 +0100
committerNico Huber <nico.h@gmx.de>2019-02-13 12:03:03 +0000
commit1653cc707938d77ce711dd41b297136fd4b16e36 (patch)
tree1e79a31dd1d7db7ca9b09811163129222179f9fc
parentfdd051976133301fc2df6c2242d690c732f71b85 (diff)
downloadcoreboot-1653cc707938d77ce711dd41b297136fd4b16e36.tar.xz
libpayload/sys/types.h: Add definition for off_t
`off_t` is supposed to be signed, but has no (minimum) width specified. We'll assume 32-bit minimum, like a `signed long int`. Also include `sys/types.h` in `libpayload.h` so everything is available through the latter. Change-Id: I6c0c1bc1a959db7863cbad2ba29318da162431be Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/31346 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--payloads/libpayload/include/libpayload.h1
-rw-r--r--payloads/libpayload/include/sys/types.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index c2510b7373..0b9ab0dcd5 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -58,6 +58,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <sys/types.h>
#include <arch/types.h>
#include <arch/io.h>
#include <arch/virtual.h>
diff --git a/payloads/libpayload/include/sys/types.h b/payloads/libpayload/include/sys/types.h
index ae143d702c..0ed4975862 100644
--- a/payloads/libpayload/include/sys/types.h
+++ b/payloads/libpayload/include/sys/types.h
@@ -27,4 +27,11 @@
* SUCH DAMAGE.
*/
+#ifndef _SYS_TYPES_H
+#define _SYS_TYPES_H
+
#include <arch/types.h>
+
+typedef signed long int off_t;
+
+#endif /* _SYS_TYPES_H */