use pkgconf_strlcpy

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'
feature/tap-sh
Graham Ollis 2018-05-29 17:36:04 -04:00 committed by William Pitcock
parent 2b5202dd1a
commit 273d1d0461
1 changed files with 1 additions and 1 deletions

View File

@ -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)