Skip to content

Commit ae52df6

Browse files
committed
Fix va_list on watchOS and visionOS
1 parent 31d3d1e commit ae52df6

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

core/src/ffi/mod.rs

+7-16
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl fmt::Debug for c_void {
213213
not(target_arch = "s390x"),
214214
not(target_arch = "x86_64")
215215
),
216-
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
216+
all(target_arch = "aarch64", target_vendor = "apple"),
217217
target_family = "wasm",
218218
target_os = "uefi",
219219
windows,
@@ -241,7 +241,7 @@ pub struct VaListImpl<'f> {
241241
not(target_arch = "s390x"),
242242
not(target_arch = "x86_64")
243243
),
244-
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
244+
all(target_arch = "aarch64", target_vendor = "apple"),
245245
target_family = "wasm",
246246
target_os = "uefi",
247247
windows,
@@ -265,7 +265,7 @@ impl<'f> fmt::Debug for VaListImpl<'f> {
265265
/// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
266266
#[cfg(all(
267267
target_arch = "aarch64",
268-
not(any(target_os = "macos", target_os = "ios", target_os = "tvos")),
268+
not(target_vendor = "apple"),
269269
not(target_os = "uefi"),
270270
not(windows),
271271
))]
@@ -362,10 +362,7 @@ pub struct VaList<'a, 'f: 'a> {
362362
not(target_arch = "s390x"),
363363
not(target_arch = "x86_64")
364364
),
365-
all(
366-
target_arch = "aarch64",
367-
any(target_os = "macos", target_os = "ios", target_os = "tvos")
368-
),
365+
all(target_arch = "aarch64", target_vendor = "apple"),
369366
target_family = "wasm",
370367
target_os = "uefi",
371368
windows,
@@ -379,10 +376,7 @@ pub struct VaList<'a, 'f: 'a> {
379376
target_arch = "s390x",
380377
target_arch = "x86_64"
381378
),
382-
any(
383-
not(target_arch = "aarch64"),
384-
not(any(target_os = "macos", target_os = "ios", target_os = "tvos"))
385-
),
379+
any(not(target_arch = "aarch64"), not(target_vendor = "apple")),
386380
not(target_family = "wasm"),
387381
not(target_os = "uefi"),
388382
not(windows),
@@ -399,7 +393,7 @@ pub struct VaList<'a, 'f: 'a> {
399393
not(target_arch = "s390x"),
400394
not(target_arch = "x86_64")
401395
),
402-
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
396+
all(target_arch = "aarch64", target_vendor = "apple"),
403397
target_family = "wasm",
404398
target_os = "uefi",
405399
windows,
@@ -425,10 +419,7 @@ impl<'f> VaListImpl<'f> {
425419
target_arch = "s390x",
426420
target_arch = "x86_64"
427421
),
428-
any(
429-
not(target_arch = "aarch64"),
430-
not(any(target_os = "macos", target_os = "ios", target_os = "tvos"))
431-
),
422+
any(not(target_arch = "aarch64"), not(target_vendor = "apple")),
432423
not(target_family = "wasm"),
433424
not(target_os = "uefi"),
434425
not(windows),

0 commit comments

Comments
 (0)