From 1bdcc3c7bca092f189f434f1f7b174090c24250c Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Tue, 15 Oct 2013 16:00:01 -0400 Subject: [PATCH] Adjust for microtime() ABI on all XBSD On the BSDs, struct timeval is not two 32-bit integers like our struct clock, so the ABI is quite incompatible. Use the native type for the function call and translate to our local type accordingly. This lets us get rid of a workaround for the FreeBSD kernel build, wherein particular compiler flags masked the stack corruption that can occur due to this ABI mismatch. Change-Id: I68f9947b0875dca7343ecd41a4c529d5c5bc3be5 Reviewed-on: http://gerrit.openafs.org/10340 Reviewed-by: Jeffrey Hutzelman Tested-by: BuildBot Reviewed-by: Antoine Verheijen Reviewed-by: Jeffrey Altman --- src/libafs/MakefileProto.FBSD.in | 5 ----- src/rx/rx_clock.h | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in index 22fd09f6b..4c3c0cd8e 100644 --- a/src/libafs/MakefileProto.FBSD.in +++ b/src/libafs/MakefileProto.FBSD.in @@ -8,11 +8,6 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config -# rx_event is miscompiled by gcc at -O0, causing panic on startup -.if empty(${CFLAGS:M-O}) -CFLAGS+= -O -.endif - # tell bsd.kmod.mk to build us vnode_if* SRCS= vnode_if.h diff --git a/src/rx/rx_clock.h b/src/rx/rx_clock.h index 648d57132..e3f20a281 100644 --- a/src/rx/rx_clock.h +++ b/src/rx/rx_clock.h @@ -97,7 +97,7 @@ extern void clock_UpdateTime(void); #if defined(AFS_SGI61_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX_64BIT_KERNEL) #define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)cv) #else -#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || (defined(AFS_DARWIN100_ENV) && defined(__amd64__)) || defined(AFS_NBSD_ENV) +#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || (defined(AFS_DARWIN100_ENV) && defined(__amd64__)) || defined(AFS_XBSD_ENV) #define clock_GetTime(cv) \ BEGIN \ struct timeval tv; \ -- 2.39.5