Skip to content

Commit ff92f9e

Browse files
committed
Modularize signal.h on FreeBSD
This nudges the Glibc modulemap just enough to get SwiftPM and later targets building. Without it, Swift tries to import the signal hander APIs through CDispatch instead of Glibc. CDispatch shouldn't be directly imported, so recommending that is nonsensical. This is not a full solution for all headers, but meant to perturb the module machinery sufficiently that it pulls signal.h into glibc correctly. Works around: ``` Swift-Project/swiftpm/Sources/Basics/Cancellator.swift:79:24: error: property '__sigaction_u' is not available due to missing import of defining module 'CDispatch' [#MemberImportVisibility] ```
1 parent 16ce6b8 commit ff92f9e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

stdlib/public/Platform/glibc.modulemap.gyb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ module SwiftGlibc [system] {
4949
export *
5050
}
5151

52+
% if CMAKE_SDK == "FREEBSD":
53+
module signal_h [system] {
54+
config_macros _BSD_VISIBLE, _POSIX_VISIBLE
55+
header "signal.h"
56+
export *
57+
}
58+
% end
59+
5260
module CUUID [system] {
5361
header "uuid/uuid.h"
5462
link "uuid"

0 commit comments

Comments
 (0)