mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-03-23 16:33:35 +08:00
broker: properly check for getaddrinfo_a()
getaddrinfo_a( is protected by _GNU_SOURCE. This is properly accounted for in the source code, in lib/net_mosq.c, but the check in the CmakeList is missing that define, which causes the check to actually fail. Add that define when checking; this fixes builds on various C libraries, like uClibc-ng, musl, or newer/older glibc. Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
This commit is contained in:
committed by
Roger A. Light
parent
68b939f997
commit
8c3bc32689
@@ -184,6 +184,7 @@ endif()
|
||||
if(WITH_ADNS)
|
||||
cmake_push_check_state()
|
||||
set(ANL_CODE "
|
||||
#define _GNU_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <netdb.h>
|
||||
int main(){
|
||||
|
||||
Reference in New Issue
Block a user