Repository navigation
Commit c9532b1
committed
[feat: expose mknodat/mkfifoat on Apple targets (#1625)]
macOS 13 and corresponding Apple platforms added mknodat/mkfifoat.
These APIs were previously excluded with cfg(not(apple)).
On Apple, resolve mknodat at runtime with the same weak-linking
pattern used for linkat/unlinkat/renameat. If the symbol is absent
(macOS < 13 and older Apple OS variants), return NOSYS so a binary
built against a newer SDK can still run on older systems. Other
targets keep calling libc mknodat directly. mkfifoat goes through
the same path.
Also import Dev and FileType on Apple so the public wrappers
compile, add XNU man-page references, and shrink the unsafe block
around the syscall.1 parent 287214b commit c9532b1
2 files changed
Lines changed: 26 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
1206 | 1205 | | |
1207 | 1206 | | |
1208 | 1207 | | |
1209 | | - | |
1210 | 1208 | | |
1211 | 1209 | | |
1212 | 1210 | | |
| |||
1220 | 1218 | | |
1221 | 1219 | | |
1222 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1223 | 1228 | | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1230 | 1244 | | |
1231 | 1245 | | |
1232 | 1246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
466 | 465 | | |
467 | 466 | | |
468 | 467 | | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
472 | 473 | | |
473 | | - | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
497 | 498 | | |
498 | 499 | | |
| 500 | + | |
499 | 501 | | |
500 | | - | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| |||
0 commit comments