Skip to content

Commit fb08fb8

Browse files
Adding the correct value for __swift_mode_t in Android.
As defined(__linux__) also matches, this never gets to the final else case.
1 parent 5a1a34b commit fb08fb8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

stdlib/public/SwiftShims/LibcShims.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ typedef long int __swift_ssize_t;
5050
// This declaration might not be universally correct.
5151
// We verify its correctness for the current platform in the runtime code.
5252
#if defined(__linux__)
53+
# if defined(__ANDROID__)
54+
typedef __swift_uint16_t __swift_mode_t;
55+
# else
5356
typedef __swift_uint32_t __swift_mode_t;
57+
# endif
5458
#elif defined(__APPLE__)
5559
typedef __swift_uint16_t __swift_mode_t;
5660
#elif defined(_WIN32)
@@ -179,10 +183,12 @@ long double _stdlib_lgammal_r(long double x, int *psigngam);
179183

180184
// TLS - thread local storage
181185

182-
#if defined(__ANDROID__)
186+
#if defined(__linux__)
187+
# if defined(__ANDROID__)
183188
typedef int __swift_thread_key_t;
184-
#elif defined(__linux__)
189+
# else
185190
typedef unsigned int __swift_thread_key_t;
191+
# endif
186192
#elif defined(__FreeBSD__)
187193
typedef int __swift_thread_key_t;
188194
#elif defined(_WIN32)

0 commit comments

Comments
 (0)