arch/sparc/include/asm/vdso.h | 11 +++++++++++ arch/sparc/vdso/vclock_gettime.c | 1 + 2 files changed, 12 insertions(+)
On sparc64, when CONFIG_WERROR=y, there are a few missing-prototype
build errors. Fix them.
Add the 4 missing prototypes to <asm/vdso.h> and include that header
file in vclock_gettime.c.
Fixes these build errors:
In file included from ../arch/sparc/vdso/vdso32/vclock_gettime.c:22:
../arch/sparc/vdso/vdso32/../vclock_gettime.c:274:1: error: no previous
prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
../arch/sparc/vdso/vdso32/../vclock_gettime.c:302:1: error: no previous
prototype for '__vdso_clock_gettime_stick' [-Werror=missing-prototypes]
../arch/sparc/vdso/vdso32/../vclock_gettime.c:327:1: error: no previous
prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes]
../arch/sparc/vdso/vdso32/../vclock_gettime.c:363:1: error: no previous
prototype for '__vdso_gettimeofday_stick' [-Werror=missing-prototypes]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: sparclinux@vger.kernel.org
---
arch/sparc/include/asm/vdso.h | 11 +++++++++++
arch/sparc/vdso/vclock_gettime.c | 1 +
2 files changed, 12 insertions(+)
--- linux-next-20251205.orig/arch/sparc/vdso/vclock_gettime.c
+++ linux-next-20251205/arch/sparc/vdso/vclock_gettime.c
@@ -19,6 +19,7 @@
#include <asm/unistd.h>
#include <asm/timex.h>
#include <asm/clocksource.h>
+#include <asm/vdso.h>
#include <asm/vvar.h>
#ifdef CONFIG_SPARC64
--- linux-next-20251205.orig/arch/sparc/include/asm/vdso.h
+++ linux-next-20251205/arch/sparc/include/asm/vdso.h
@@ -19,4 +19,15 @@ extern const struct vdso_image vdso_imag
extern const struct vdso_image vdso_image_32_builtin;
#endif
+struct __kernel_old_timespec;
+struct timezone;
+notrace int
+__vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts);
+notrace int
+__vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts);
+notrace int
+__vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
+notrace int
+__vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz);
+
#endif /* _ASM_SPARC_VDSO_H */
Hi Randy, On Mon, Dec 08, 2025 at 09:03:32PM -0800, Randy Dunlap wrote: > On sparc64, when CONFIG_WERROR=y, there are a few missing-prototype > build errors. Fix them. > > Add the 4 missing prototypes to <asm/vdso.h> and include that header > file in vclock_gettime.c. > > Fixes these build errors: > In file included from ../arch/sparc/vdso/vdso32/vclock_gettime.c:22: > ../arch/sparc/vdso/vdso32/../vclock_gettime.c:274:1: error: no previous > prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] > ../arch/sparc/vdso/vdso32/../vclock_gettime.c:302:1: error: no previous > prototype for '__vdso_clock_gettime_stick' [-Werror=missing-prototypes] > ../arch/sparc/vdso/vdso32/../vclock_gettime.c:327:1: error: no previous > prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] > ../arch/sparc/vdso/vdso32/../vclock_gettime.c:363:1: error: no previous > prototype for '__vdso_gettimeofday_stick' [-Werror=missing-prototypes] This issue would also be fixed by my patch series adopting the generic vDSO library on SPARC [0]. Picking up your patch would introduce conflicts. [0] https://lore.kernel.org/lkml/20251106-vdso-sparc64-generic-2-v5-0-97ff2b6542f7@linutronix.de/ Thomas
On 12/21/25 11:36 PM, Thomas Weißschuh wrote: > Hi Randy, > > On Mon, Dec 08, 2025 at 09:03:32PM -0800, Randy Dunlap wrote: >> On sparc64, when CONFIG_WERROR=y, there are a few missing-prototype >> build errors. Fix them. >> >> Add the 4 missing prototypes to <asm/vdso.h> and include that header >> file in vclock_gettime.c. >> >> Fixes these build errors: >> In file included from ../arch/sparc/vdso/vdso32/vclock_gettime.c:22: >> ../arch/sparc/vdso/vdso32/../vclock_gettime.c:274:1: error: no previous >> prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] >> ../arch/sparc/vdso/vdso32/../vclock_gettime.c:302:1: error: no previous >> prototype for '__vdso_clock_gettime_stick' [-Werror=missing-prototypes] >> ../arch/sparc/vdso/vdso32/../vclock_gettime.c:327:1: error: no previous >> prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] >> ../arch/sparc/vdso/vdso32/../vclock_gettime.c:363:1: error: no previous >> prototype for '__vdso_gettimeofday_stick' [-Werror=missing-prototypes] > > This issue would also be fixed by my patch series adopting the generic > vDSO library on SPARC [0]. > Picking up your patch would introduce conflicts. > > [0] https://lore.kernel.org/lkml/20251106-vdso-sparc64-generic-2-v5-0-97ff2b6542f7@linutronix.de/ OK, thanks for the info. Patch dropped. -- ~Randy
© 2016 - 2026 Red Hat, Inc.