kopia lustrzana https://github.com/micropython/micropython-lib
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>pull/995/head
rodzic
d1a74360a2
commit
42caaf14de
|
@ -5,7 +5,10 @@ import os
|
|||
from signal import *
|
||||
|
||||
libc = ffilib.libc()
|
||||
librt = ffilib.open("librt")
|
||||
try:
|
||||
librt = ffilib.open("librt")
|
||||
except OSError as e:
|
||||
librt = libc
|
||||
|
||||
CLOCK_REALTIME = 0
|
||||
CLOCK_MONOTONIC = 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
metadata(version="0.2.1")
|
||||
metadata(version="0.2.2")
|
||||
|
||||
# Originally written by Paul Sokolovsky.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue