From 4d39fe8d040760c0882c46218c925d75a68f5c5a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 10 Jan 2024 02:49:35 +0000 Subject: [PATCH] libroken: Fill in NI_NUMERICSCOPE as 0 if not defined. This flag has defined by POSIX for years if not decades, but glibc and Windows apparently still don't have it. We will use it with getnameinfo, along with all other NI_NUMERICxxx options, to minimize risk of network leaks with block_dns. --- lib/roken/roken-common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/roken/roken-common.h b/lib/roken/roken-common.h index 906b00033..f3a4c0422 100644 --- a/lib/roken/roken-common.h +++ b/lib/roken/roken-common.h @@ -251,6 +251,14 @@ #define NI_NUMERICSERV 0x10 #endif +/* + * NI_NUMERICSCOPE is still missing from glibc as of 2024: + * https://sourceware.org/bugzilla/show_bug.cgi?id=14102 + */ +#ifndef NI_NUMERICSCOPE +#define NI_NUMERICSCOPE 0 +#endif + /* * constants for getnameinfo */