Commit a92c89f
authored
Fix compatibility with older 32-bit kernels (#1374)
* Fix handling of negative timestamps in `stat` on Linux.
Some Linux `stat64` structs are defined with `st_atime`, `st_mtime`, and
`st_ctime` fields using unsigned types, even though they hold signed
values. Convert them to signed before converting them to `i64`, so that
they're signed-extended.
This fixes test failures on old 32-bit Linux platforms which lack
`statx`.
* Fix select fallback for 32-bit platforms.
* Add a "linux_5_1" feature for specializing for Linux >= 5.1.
* Fix `test_vdso` to handle older kernel versions on x86 and powerpc.
* Fix poll, select, epoll_wait, and futex for 32-bit platforms.
Handle kernel versions that lack _time64 syscalls. And change all
timeouts to `Option<&Timepsec>`, for efficiency and consistency.
* Use `opt_ref` for passing optional references to syscalls.
* Fix `Timespec` layout on Windows to match `Nsecs`.
* Convert kernel_sigtimedwait to use timeouts like poll/etc.1 parent 7592cd6 commit a92c89f
File tree
15 files changed
+486
-241
lines changed- src
- backend
- libc
- event
- thread
- linux_raw
- event
- fs
- runtime
- thread
- thread
- tests
- event
- thread
15 files changed
+486
-241
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
143 | 159 | | |
144 | 160 | | |
145 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | | - | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
576 | | - | |
577 | 575 | | |
578 | 576 | | |
579 | 577 | | |
580 | 578 | | |
581 | 579 | | |
582 | | - | |
| 580 | + | |
583 | 581 | | |
584 | 582 | | |
585 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
| 562 | + | |
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | | - | |
634 | | - | |
| 632 | + | |
635 | 633 | | |
636 | 634 | | |
637 | 635 | | |
638 | 636 | | |
639 | 637 | | |
640 | 638 | | |
641 | 639 | | |
| 640 | + | |
| 641 | + | |
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
| 667 | + | |
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | 674 | | |
678 | 675 | | |
679 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
0 commit comments