We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d37c46 commit a45bf60Copy full SHA for a45bf60
Package.swift
@@ -122,4 +122,10 @@ let package = Package(
122
.linkedLibrary("Pathcch", .when(platforms: [.windows])),
123
]
124
}
125
+#elseif os(Linux)
126
+ if let TSCclibc = package.targets.first(where: { $0.name == "TSCclibc" }) {
127
+ TSCclibc.cSettings = [
128
+ .define("_GNU_SOURCE", .when(platforms: [.linux])),
129
+ ]
130
+ }
131
#endif
Sources/TSCclibc/CMakeLists.txt
@@ -10,6 +10,8 @@ add_library(TSCclibc STATIC
10
libc.c process.c)
11
target_include_directories(TSCclibc PUBLIC
12
include)
13
+target_compile_definitions(TSCclibc PRIVATE
14
+ "$<$<PLATFORM_ID:Linux>:_GNU_SOURCE>")
15
16
if(NOT BUILD_SHARED_LIBS)
17
install(TARGETS TSCclibc
0 commit comments