From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1754000750; bh=7M3zmUPOb/xJfkWuLg73UGjyTdOEpSM+R8yYoyoyQC4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=on5Pb23HM/Dtfnl+/uGM0+W/eT2+Toh4PVOXZqE8xK023IHA+wSkNqNaVCxrYOvFy 4iYHah6nM3dXFwKHdAy1obQJExPjdgiJ0g2R5973FEPpFyU06nJcvV3gvvpdEkJis1 2QCO9kn6N/foAGpIoc+V6Mmz8iTj2P82xZNPGF9pftKFPOtfR0igSkPcTfozHZXsqK Nyt/YbsbIw/RhYYTJcjsLphrAzxm+92dl+NihkwmI8za1eCEtgaGyWejuPgBhR6ORk xzmFce5nhtG/MYI1HJF/OYK76unBbaf6x80rsWLEo/vQWv8NJmATiC8tU6dd95EEj/ 1GI4f+qxlro9Q== Received: from localhost.localdomain (unknown [68.183.184.174]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id B1D8B3126ED6; Thu, 31 Jul 2025 22:25:49 +0000 (UTC) From: Alviro Iskandar Setiawan To: Ammar Faizi Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v2 2/2] configure: Append `-lanl` lib to fix missing `getaddrinfo_a()` Date: Fri, 1 Aug 2025 05:25:43 +0700 Message-Id: <20250731222543.303821-3-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250731222543.303821-1-alviro.iskandar@gnuweeb.org> References: <20250731222543.303821-1-alviro.iskandar@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Compiling on GNU CC version 8.5.0 20210514 (Red Hat 8.5.0-26) with glibc version 2.28 throws this error: undefined reference to `getaddrinfo_a' As such, `getaddrinfo_a()` is never used in that environment eventhough it's available. Append `-lanl` if on `getaddrinfo_a()` check. Signed-off-by: Alviro Iskandar Setiawan --- Makefile | 2 +- configure | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d0d6d85..6c2e9be 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ ifndef OPTIMIZE OPTIMIZE = -O2 endif INCLUDE_FLAGS = -I./src/ -LIBS = -lpthread DEPFLAGS = -MMD -MP -MF $@.d LDFLAGS_SHARED = $(LDFLAGS) -shared GWPROXY_DIR = ./src/gwproxy @@ -80,6 +79,7 @@ config.make: configure endif endif -include config.make +LIBS=$(LIB_LDFLAGS) ifeq ($(CONFIG_IO_URING),y) GWPROXY_CC_SOURCES += $(GWPROXY_DIR)/ev/io_uring.c diff --git a/configure b/configure index 0b5815d..17bdf6f 100755 --- a/configure +++ b/configure @@ -356,20 +356,20 @@ fi; # ------ Check for getaddrinfo_a() ------ cat > $tmp_c << EOF -#define _GNU_SOURCE #include int main(void) { struct sigevent ev; - struct gaicb gc; + struct gaicb *gc = (void *)0; getaddrinfo_a(GAI_NOWAIT, &gc, 1, &ev); return 0; } EOF l="Do we have getaddrinfo_a()?"; -if compile_cc "" "" "getaddrinfo_a()"; then +if compile_cc "" "-lanl" "getaddrinfo_a()"; then add_config "CONFIG_HAVE_GETADDRINFO_A"; print_supp "yes" "${l}"; + LIB_LDFLAGS="${LIB_LDFLAGS} -lanl"; else print_supp "no" "${l}"; fi; -- Alviro Iskandar Setiawan