It looks rather promising. And while I might copy it over and fix it
locally, I would like to escalate this upstream, if the algorithm there is
Either way, I'd need to know what the correct way is.
What I understood now is:
On current versions -lpthread should work. On some older versions I should
be using -lthr (so not -lc_r, then?).
Is there a safe way to check whether we're running a version that needs
-lthr? In the varnish example you provided, I cannot find a check for
On Mon, February 4, 2008 3:49 pm, Dag-Erling Sm??rgrav said:
Note that the correct idiom according to POSIX is -lpthread, so that
should in theory work on all POSIX platforms. The reason why Varnish
checks for -lthr explicitly is that there are FreeBSD versions where
-lpthread defaults to -lkse instead of -lthr, and -lkse has proven to
break rather badly under load.