From 7076523e482110d59c4456f4a795581a2ca39c41 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 18 Aug 2023 16:08:19 +0200 Subject: nftutils: add and use wrappers for getprotoby{name,number}_r(), getservbyport_r() We should aim to use the thread-safe variants of getprotoby{name,number} and getservbyport(). However, they may not be available with other libc, so it requires a configure check. As that is cumbersome, add wrappers that do that at one place. These wrappers are thread-safe, if libc provides the reentrant versions. Use them. Signed-off-by: Thomas Haller Signed-off-by: Pablo Neira Ayuso --- src/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index ace38bd7..ad22a918 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,6 +64,8 @@ libnftables_la_SOURCES = \ segtree.c \ gmputil.c \ utils.c \ + nftutils.c \ + nftutils.h \ erec.c \ mnl.c \ iface.c \ -- cgit v1.2.3