[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] why is librt needed?
|
Originally, librt contained (among other things) the "advanced" POSIX
clock and timer functions, like clock_gettime(). So, if you wanted
access to the monotonic clock, you needed librt. But these functions
became fairly mainstream and most system libraries started absorbing
them. According to the Linux man page, glibc implemented clock_gettime()
and related functions in v2.17 (released in 2012).
So I'm guessing it is pretty system dependent on where it's still needed.
Frank
On 7/11/25 21:00, Greg Troxel via mosquitto-dev wrote:
In lib's CMakeLists.txt, it includes librt if it exists, in general,
except for a list where it doesn't. I've been carrying a patch to add
NetBSD to the "don't add librt" list.
Looking at this harder, I don't understand at all.
Looking at POSIX, I don't see a requirement to include librt.
NetBSD has /usr/lib/librt.a (and .so). Extracting defined symbols, and
grepping for them in mosquitto sources, I find no matches.
So:
Does mosquitto use POSIX realtime calls at all? If so, which ones?
Is librt needed on any system?
Is it a good idea to add it to the link in general, if it exists?
Why is it excluded on APPLE and ANDROID? What breaks?
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev