aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-08 18:37:57 +0000
committerOmar Polo <op@omarpolo.com>2024-06-08 18:37:57 +0000
commit401030113e383542ae85f2e51bde9f94ff4015f8 (patch)
tree2f21d5f5c19c85e2ce3efb50b7d3f6a0407c6336 /utils.c
parentfcf3f1fa9a0d6b30a189e7e71fc55348d72595ce (diff)
change the approach for strnvis
instead of making things more obscure via gmid_strnvis(), let's just check for strnvis with -Werror so we can swap the OS broken implementation with the bundled OpenBSD one.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/utils.c b/utils.c
index bbb6b11..313fc13 100644
--- a/utils.c
+++ b/utils.c
@@ -497,19 +497,3 @@ new_proxy(void)
p->protocols = TLS_PROTOCOLS_DEFAULT;
return p;
}
-
-/*
- * I can't rant enough about this situation. As far as I've understood,
- * OpenBSD introduced strnvis(3) with a signature, then NetBSD did it but
- * with a incompatible signature. FreeBSD followed NetBSD. libbsd followed
- * OpenBSD but now is thinking to switch. WTF?
- */
-int
-gmid_strnvis(char *dst, const char *src, size_t destsize, int flag)
-{
-#if HAVE_BROKEN_STRNVIS
- return strnvis(dst, destsize, src, flag);
-#else
- return strnvis(dst, src, destsize, flag);
-#endif
-}