Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 42caaf1

Browse files
basvddpgeorge
authored andcommitted
unix-ffi/machine: Use libc if librt is not present.
Newer implementations of libc integrate the functions from librt, for example glibc since 2.17 and uClibc-ng. So if the librt.so cannot be loaded, it can be assumed that libc contains the expected functions. Signed-off-by: Bas van Doren <basvdoren@gmail.com>
1 parent d1a7436 commit 42caaf1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎unix-ffi/machine/machine/timer.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
from signal import *
66

77
libc = ffilib.libc()
8-
librt = ffilib.open("librt")
8+
try:
9+
librt = ffilib.open("librt")
10+
except OSError as e:
11+
librt = libc
912

1013
CLOCK_REALTIME = 0
1114
CLOCK_MONOTONIC = 1

‎unix-ffi/machine/manifest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.2.1")
1+
metadata(version="0.2.2")
22

33
# Originally written by Paul Sokolovsky.
44

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /