18

CMake: Add -pthread compile option on posix platforms by Smjert · Pull Request #...

 2 years ago
source link: https://github.com/osquery/osquery/pull/6909
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Member

Smjert commented on Jan 17, 2021

osquery was already linking with -pthread and so linking
to libpthread on Linux, but it wasn't always defining
the _REENTRANT macro which is done by the -pthread option
given at compile time.
Although in the third party libraries that need it,
it should've been defined in other ways (directly or via a config.h),
always add -pthread for correctness and consistency.

Note: macOS doesn't need -pthread at link time because
pthreads are already implemented inside the libc library.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK