forked from ariadne/pkgconf
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
parent
2b5202dd1a
commit
273d1d0461
|
@ -192,7 +192,7 @@ load_personality_with_path(const char *path, const char *triplet)
|
||||||
if (triplet != NULL)
|
if (triplet != NULL)
|
||||||
snprintf(pathbuf, sizeof pathbuf, "%s/%s.personality", path, triplet);
|
snprintf(pathbuf, sizeof pathbuf, "%s/%s.personality", path, triplet);
|
||||||
else
|
else
|
||||||
strlcpy(pathbuf, path, sizeof pathbuf);
|
pkgconf_strlcpy(pathbuf, path, sizeof pathbuf);
|
||||||
|
|
||||||
f = fopen(pathbuf, "r");
|
f = fopen(pathbuf, "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
|
|
Loading…
Reference in New Issue