Skip to content

Commit b81f510

Browse files
authored
Merge pull request #5144 from finagolfin/main
[android] Fix package manifest and one Bionic function's API version
2 parents 8255a77 + de3d58f commit b81f510

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Package.swift

+6-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if let environmentPath = Context.environment["DISPATCH_INCLUDE_PATH"] {
2626
.unsafeFlags([
2727
"-I/usr/lib/swift",
2828
"-I/usr/lib/swift/Block"
29-
], .when(platforms: [.linux, .android]))
29+
], .when(platforms: [.linux]))
3030
)
3131
if let sdkRoot = Context.environment["SDKROOT"] {
3232
dispatchIncludeFlags.append(.unsafeFlags([
@@ -245,7 +245,8 @@ let package = Package(
245245
"BlockRuntime",
246246
"CMakeLists.txt"
247247
],
248-
cSettings: coreFoundationBuildSettings
248+
cSettings: coreFoundationBuildSettings,
249+
linkerSettings: [.linkedLibrary("log", .when(platforms: [.android]))]
249250
),
250251
.target(
251252
name: "BlocksRuntime",
@@ -262,7 +263,7 @@ let package = Package(
262263
name: "_CFXMLInterface",
263264
dependencies: [
264265
"CoreFoundation",
265-
.target(name: "Clibxml2", condition: .when(platforms: [.linux])),
266+
.target(name: "Clibxml2", condition: .when(platforms: [.linux, .android])),
266267
],
267268
path: "Sources/_CFXMLInterface",
268269
exclude: [
@@ -275,7 +276,7 @@ let package = Package(
275276
name: "_CFURLSessionInterface",
276277
dependencies: [
277278
"CoreFoundation",
278-
.target(name: "Clibcurl", condition: .when(platforms: [.linux])),
279+
.target(name: "Clibcurl", condition: .when(platforms: [.linux, .android])),
279280
],
280281
path: "Sources/_CFURLSessionInterface",
281282
exclude: [
@@ -348,7 +349,7 @@ let package = Package(
348349
"FoundationNetworking",
349350
"XCTest",
350351
"Testing",
351-
.target(name: "xdgTestHelper", condition: .when(platforms: [.linux]))
352+
.target(name: "xdgTestHelper", condition: .when(platforms: [.linux, .android]))
352353
],
353354
resources: [
354355
.copy("Foundation/Resources")

Sources/CoreFoundation/CFPlatform.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,7 @@ CF_EXPORT int _CFPosixSpawnFileActionsChdir(_CFPosixSpawnFileActionsRef file_act
22832283
// Glibc versions prior to 2.29 don't support posix_spawn_file_actions_addchdir_np, impacting:
22842284
// - Amazon Linux 2 (EoL mid-2025)
22852285
return ENOSYS;
2286-
#elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__musl__)
2286+
#elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || (defined(__ANDROID__) && __ANDROID_API__ >= 34) || defined(__musl__)
22872287
// Pre-standard posix_spawn_file_actions_addchdir_np version available in:
22882288
// - Solaris 11.3 (October 2015)
22892289
// - Glibc 2.29 (February 2019)

0 commit comments

Comments
 (0)