File tree Expand file tree Collapse file tree 4 files changed +378
-1
lines changed Expand file tree Collapse file tree 4 files changed +378
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
27
27
endif ()
28
28
endif ()
29
29
30
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
30
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
31
31
add_subdirectory (Glibc )
32
32
endif ()
Original file line number Diff line number Diff line change @@ -17,7 +17,12 @@ if (NOT EXISTS "${GLIBC_ARCH_INCLUDE_PATH}/sys")
17
17
endif ()
18
18
19
19
# Generate module.map
20
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
20
21
configure_file (module.map.in "${CMAKE_CURRENT_BINARY_DIR} /module.map" @ONLY )
22
+ endif ()
23
+ if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
24
+ configure_file (module.freebsd.map.in "${CMAKE_CURRENT_BINARY_DIR} /module.map" @ONLY )
25
+ endif ()
21
26
22
27
add_custom_command_target (unused_var
23
28
COMMAND
Original file line number Diff line number Diff line change 18
18
19
19
public var errno : Int32 {
20
20
get {
21
+ #if os(FreeBSD)
22
+ return __error ( ) . memory
23
+ #else
21
24
return __errno_location ( ) . memory
25
+ #endif
22
26
}
23
27
set ( val) {
28
+ #if os(FreeBSD)
29
+ return __error ( ) . memory = val
30
+ #else
24
31
return __errno_location ( ) . memory = val
32
+ #endif
25
33
}
26
34
}
27
35
You can’t perform that action at this time.
0 commit comments