Skip to content

Commit c18b4be

Browse files
committed
Add shim for extern_proc's p_starttime.
This constant is not imported by the ClangImporter: #define p_starttime p_un.__p_starttime Add a shim to do the same thing. Fixes rdar://problem/31549450
1 parent 66d9533 commit c18b4be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stdlib/public/Platform/Darwin.swift.gyb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ public let ${prefix}_TRUE_MIN = ${type}.leastNonzeroMagnitude
7070
#endif
7171
% end
7272
%end
73+
74+
// Macros defined in bsd/sys/proc.h that do not import into Swift.
75+
extension extern_proc {
76+
// #define p_starttime p_un.__p_starttime
77+
@_transparent var p_starttime: timeval {
78+
get { return self.p_un.__p_starttime }
79+
set { self.p_un.__p_starttime = newValue }
80+
}
81+
}

0 commit comments

Comments
 (0)