mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-04-10 01:13:10 +02:00
Not all C libraries are glibc, or impersonating it; for example, musl does not pretend to be any version of glibc. Thus, building on musl fails when openssl is disabled, because no random-providing function is detected, although musl does provide getrandom(). uClibc-ng on the other hand, can impersonate glibc, but availability of getrandom() is not guatranteed there: getrandom() can be compiled out of uClinbc-ng, or uClibc-ng can be too old to have it. Add a configure-time check that getrandom() is available, as a fallback when TLS is not enabled (and thus openssl is not used), and when not on Win32 (where getting random numbers is always possible, at least from a build perspective). However, building with the plain Makefiles should keep working, so slightly rework the defines checks in the code to account for the fact that HAVE_GETRANDOM may already be defined at configure time. Signed-off-by: Yann E. MORIN <yann.morin@orange.com> |
||
|---|---|---|
| .. | ||
| base64_common.c | ||
| cjson_common.c | ||
| CMakeLists.txt | ||
| file_common.c | ||
| linker.version | ||
| Makefile | ||
| memory_common.c | ||
| mqtt_common.c | ||
| password_common.c | ||
| property_common.c | ||
| property_common.h | ||
| random_common.c | ||
| strings_common.c | ||
| time_common.c | ||
| topic_common.c | ||
| utf8_common.c | ||