mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 20:31:00 +01:00
MINOR: compat: automatically detect support for crypt_r()
glibc >= 2.2 and FreeBSD >= 12.0 support crypt_r(), let's detect this and set a macro HA_HAVE_CRYPT_R for this.
This commit is contained in:
parent
34d4b525a1
commit
4698adf68f
@ -152,6 +152,16 @@
|
|||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* crypt_r() has been present in glibc since 2.2 and on FreeBSD since 12.0
|
||||||
|
* (12000002). No other OS makes any mention of it for now. Feel free to add
|
||||||
|
* valid known combinations below if needed to relax the crypt() lock when
|
||||||
|
* using threads.
|
||||||
|
*/
|
||||||
|
#if (defined(__GNU_LIBRARY__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) \
|
||||||
|
|| (defined(__FreeBSD__) && __FreeBSD_version >= 1200002)
|
||||||
|
#define HA_HAVE_CRYPT_R
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _COMMON_COMPAT_H */
|
#endif /* _COMMON_COMPAT_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user