From 273d1d0461c62d13ddcf95616daf85f85c5e6929 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Tue, 29 May 2018 17:36:04 -0400 Subject: [PATCH] use pkgconf_strlcpy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Debian/Ubuntu I get: CC libpkgconf/personality.lo libpkgconf/personality.c: In function ‘load_personality_with_path’: libpkgconf/personality.c:195:3: warning: implicit declaration of function ‘strlcpy’ [-Wimplicit-function-declaration] strlcpy(pathbuf, path, sizeof pathbuf); ^~~~~~~ CC libpkgconf/parser.lo CCLD libpkgconf.la ar: `u' modifier ignored since `D' is the default (see `U') CC cli/pkgconf-main.o CC cli/pkgconf-getopt_long.o CC cli/pkgconf-renderer-msvc.o CCLD pkgconf ./.libs/libpkgconf.so: undefined reference to `strlcpy' --- libpkgconf/personality.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpkgconf/personality.c b/libpkgconf/personality.c index 8e222b9..06a0471 100644 --- a/libpkgconf/personality.c +++ b/libpkgconf/personality.c @@ -192,7 +192,7 @@ load_personality_with_path(const char *path, const char *triplet) if (triplet != NULL) snprintf(pathbuf, sizeof pathbuf, "%s/%s.personality", path, triplet); else - strlcpy(pathbuf, path, sizeof pathbuf); + pkgconf_strlcpy(pathbuf, path, sizeof pathbuf); f = fopen(pathbuf, "r"); if (f == NULL)