lib/replace: fix strlcat/strlcpy compile for Honggfuzz
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 28 Jul 2023 03:36:21 +0000 (15:36 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Aug 2023 05:35:08 +0000 (05:35 +0000)
commit269738d6ce42a2e4979bfca33328fbf0bf0e6d10
treebffdf56791616809d5972ff982b0b49efd56c37b
parentf0e0ff262ab720e2e0cd48aa82549ad9c5ed69ec
lib/replace: fix strlcat/strlcpy compile for Honggfuzz

Otherwise we getthis kind of thing:

../../lib/replace/replace.c:837:3: error: implicit declaration of function 'strlcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                strlcpy(buf, s, buflen);

../../third_party/heimdal/lib/roken/getarg.c:288:6: error: implicit declaration of function 'strlcat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            strlcat(buf, "]", sizeof(buf));

because we found the symbol names in libc, but didn't check that the
functions are declared in <string.h>. We already include
<bsd/string.h> whenever we have it.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  8 05:35:08 UTC 2023 on atb-devel-224
lib/replace/wscript