summaryrefslogtreecommitdiff
path: root/src/commonlib
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2017-10-30 19:28:52 +0100
committerMartin Roth <martinroth@google.com>2017-11-04 00:32:13 +0000
commit7bd4715a7016b3228df877d625cf26a3694cfebe (patch)
treef2e1f99c10c3ebb9127639db7664d822dee01904 /src/commonlib
parentebd7c44d7b0b3f44fd0f5b5351ee7e8169a31312 (diff)
downloadcoreboot-7bd4715a7016b3228df877d625cf26a3694cfebe.tar.xz
commonlib/helpers.h: Include stddef.h
The definition of offsetof() uses size_t, which is declared in stddef.h, according to POSIX. Include stddef.h directly to avoid relying on implicit inclusion. Change-Id: I221be02c332de55c9fcf7d86673709ed43dd5c3c Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/22230 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Schander <coreboot@mimoja.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/commonlib')
-rw-r--r--src/commonlib/include/commonlib/helpers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commonlib/include/commonlib/helpers.h b/src/commonlib/include/commonlib/helpers.h
index 0a796ba85b..f2acedca0f 100644
--- a/src/commonlib/include/commonlib/helpers.h
+++ b/src/commonlib/include/commonlib/helpers.h
@@ -15,6 +15,10 @@
#define COMMONLIB_HELPERS_H
/* This file is for helpers for both coreboot firmware and its utilities. */
+#ifndef __ASSEMBLER__
+#include <stddef.h>
+#endif
+
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif