Commit a35783e
committed
Repair non-unix builds
There were a couple of unix-specifc API usages wrapped by `if cfg!(unix)`.
The problem with this approach is that although `if cfg!(unix)` will
prevent that branch from being taken on non-unix platforms at runtime, it
*does not* eliminate that branch at compile time. Thus any use of
unix-specific APIs within those blocks will cause compilation failure on
non-unix platforms.
The repair is to create unix and non-unix functions that are resolved at
compile time.1 parent 0f34279 commit a35783e
2 files changed
+34
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| |||
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
| |||
151 | 145 | | |
152 | 146 | | |
153 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
649 | 646 | | |
650 | 647 | | |
651 | 648 | | |
| |||
1172 | 1169 | | |
1173 | 1170 | | |
1174 | 1171 | | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
0 commit comments