Skip to content

Commit 4f24d89

Browse files
committed
[stdlib] Use Clang type macros on OpenBSD.
Per the code comment, stdint.h is provided by clang and therefore conflicts with Glibc; additionally, clang defines some particular type macros for making the appropriate `typedef`s. OpenBSD uses clang-10, so we can also use these types on this platform. This also addresses a test case that has gone awry.
1 parent 31e460b commit 4f24d89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/SwiftShims/SwiftStdint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// Clang has been defining __INTxx_TYPE__ macros for a long time.
2626
// __UINTxx_TYPE__ are defined only since Clang 3.5.
27-
#if !defined(__APPLE__) && !defined(__linux__)
27+
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__)
2828
#include <stdint.h>
2929
typedef int64_t __swift_int64_t;
3030
typedef uint64_t __swift_uint64_t;

0 commit comments

Comments
 (0)