Module Name: src Committed By: gutteridge Date: Mon Nov 25 21:20:46 UTC 2024
Modified Files: src/usr.sbin/mopd/common: port.h Log Message: mopd/common/port.h: fix vax tools build failure on recent Linux This header provided a definition of strlcpy(3) that doesn't align with the common/expected return type (char * here vs. size_t normally). glibc 2.38 and later provide strlcpy(3), which causes this to break the vax tools build on recent Linux distros like Fedora 40. As an immediate fix, simply comment this out. This shouldn't be needed on any Linux host tools build, as strlcpy(3) is provided by compat anyway. Build tested on Fedora 40 and Debian 12 (which has glibc 2.36, without the function). (The getprogname(3) definition still seems to be needed on Fedora 40.) Issue reported by Jan-Benedict Glaw. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/mopd/common/port.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/mopd/common/port.h diff -u src/usr.sbin/mopd/common/port.h:1.1 src/usr.sbin/mopd/common/port.h:1.2 --- src/usr.sbin/mopd/common/port.h:1.1 Wed Jun 8 01:13:14 2016 +++ src/usr.sbin/mopd/common/port.h Mon Nov 25 21:20:46 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: port.h,v 1.1 2016/06/08 01:13:14 christos Exp $ */ +/* $NetBSD: port.h,v 1.2 2024/11/25 21:20:46 gutteridge Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -64,6 +64,8 @@ getprogname(void) { return __progname; } +/* Commented out to fix vax tools build on Linux. */ +/* static inline char * strlcpy(char *d, const char *s, size_t l) { @@ -73,4 +75,5 @@ strlcpy(char *d, const char *s, size_t l d[l - 1] = '\0'; return d; } +*/ #endif