Fix function conflict with Glibc 2.38
continuous-integration/drone/push Build is passing Details

main
Clément FRÉVILLE 6 months ago
parent 9769f788b5
commit 036b319210

@ -8,7 +8,7 @@
#include <string.h>
#include <sys/types.h>
int strlcpy(char *restrict dest, const char *restrict src, size_t bufsize) {
static int id_strlcpy(char *restrict dest, const char *restrict src, size_t bufsize) {
size_t i;
for (i = 0; i < bufsize; ++i) {
dest[i] = src[i];
@ -28,7 +28,7 @@ int getlogin_r(char *buf, size_t bufsize) {
if (login == NULL) {
return ENOENT;
}
return strlcpy(buf, login, bufsize);
return id_strlcpy(buf, login, bufsize);
}
struct passwd *getpwuid(uid_t uid) {

Loading…
Cancel
Save