Skip to content

Commit 690ac70

Browse files
authored
Merge pull request RustPython#3369 from deantvv/posix-rtld-constants
posix: add rtld constants
2 parents 1c966f1 + 91256a4 commit 690ac70

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/test/test_posix.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,8 +1394,6 @@ def test_sched_setaffinity(self):
13941394
self.assertRaises(OverflowError, posix.sched_setaffinity, 0, [1<<128])
13951395
self.assertRaises(OSError, posix.sched_setaffinity, -1, mask)
13961396

1397-
# TODO: RUSTPYTHON: AttributeError: module 'posix' has no attribute 'RTLD_LAZY'
1398-
@unittest.expectedFailure
13991397
def test_rtld_constants(self):
14001398
# check presence of major RTLD_* constants
14011399
posix.RTLD_LAZY

vm/src/stdlib/posix.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ pub mod module {
6565
#[pyattr]
6666
use libc::{O_NDELAY, O_NOCTTY};
6767

68+
#[pyattr]
69+
use libc::{RTLD_GLOBAL, RTLD_LAZY, RTLD_LOCAL, RTLD_NOW};
70+
6871
#[pyattr]
6972
const EX_OK: i8 = exitcode::OK as i8;
7073
#[pyattr]

0 commit comments

Comments
 (0)