summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-11-15 12:01:15 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-11-20 13:59:53 +0000
commit957514d4f73cc05bc222ceb18de24c5d9bb16623 (patch)
tree658a299a3cd78af6d82e4a2b45a3a594599369e4 /include
parent7ec31b8021120437a7951a9944546e58170c87c5 (diff)
stdlib: Increase compatibility with TF-A
Code that originates from the Trusted Firmware-A project expects the stdlib headers to work in a specific way and to have some specific defines. Specifically, TF-A doesn't have the non-standard types.h header, and it has all the definitions in stdint.h. Also, the __init define is missing. No component of this repository needs this option, but having the define in cdefs.h allows code sharing between both projects. Change-Id: Ic298fd87a6c2cf8a9e5b8a18fc274d4150ed0a13 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/stdlib/sys/cdefs.h3
-rw-r--r--include/lib/stdlib/sys/stdint.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/include/lib/stdlib/sys/cdefs.h b/include/lib/stdlib/sys/cdefs.h
index 16fb151..27f73fc 100644
--- a/include/lib/stdlib/sys/cdefs.h
+++ b/include/lib/stdlib/sys/cdefs.h
@@ -36,6 +36,9 @@
#ifndef _SYS_CDEFS_H_
#define _SYS_CDEFS_H_
+/* Defined here for compatibility with the Trusted Firmware source code */
+#define __init
+
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
diff --git a/include/lib/stdlib/sys/stdint.h b/include/lib/stdlib/sys/stdint.h
index aa5ac81..fb6e35a 100644
--- a/include/lib/stdlib/sys/stdint.h
+++ b/include/lib/stdlib/sys/stdint.h
@@ -31,6 +31,7 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
+#include <sys/types.h>
#include <machine/_stdint.h>
#include <sys/_stdint.h>