--- /dev/null
+#ifndef STDINT_H
+#define STDINT_H
+
+#if defined(__arm__) || defined(__i386__) || defined(__mips__)
+typedef unsigned int uint32_t;
+typedef unsigned int uintptr_t;
+#elif defined(__x86_64__)
+typedef unsigned int uint32_t;
+typedef unsigned long uintptr_t;
+#else
+#error "Unknown target architecture"
+#endif
+
+#endif /* STDINT_H */
-// RUN: %clang -target arm-unknown-linux-gnueabi -ffreestanding -fsyntax-only %s
-// RUN: %clang -target i686-unknown-linux -ffreestanding -fsyntax-only %s
-// RUN: %clang -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target arm-unknown-linux-gnueabi \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target mips-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target i686-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target x86_64-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+
+// RUN: %clang -target arm-unknown-linux-gnueabi \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target mips-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target i686-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target x86_64-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
#include "unwind.h"