Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] why is librt needed?

Hi Greg,

As I remember it used to be a requirement on some systems where use of some functions listed it as needed. Definitely Solaris was one. I think it's all been merged into glibc or equivalent now so is no longer necessary.

Cheers, 

Roger

On Sat, 12 Jul 2025, 02:00 Greg Troxel via mosquitto-dev, <mosquitto-dev@xxxxxxxxxxx> 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

Back to the top