From 840e4d2123e1e94adfc27ae0b286a11d472cf0fc Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Sun, 18 Oct 2009 22:48:56 -0500 Subject: [PATCH] Avoid 'static __inline' on HPUX 'static __inline' functions on HPUX can segfault the /opt/ansic compiler (unless we lose debugging symbols). So, just use 'static' for those functions on HPUX. Also revert a9368a6c3dfe4435ec2ae63fff4a3325104ed9f7, so we get a static inline function on other platforms. Reviewed-on: http://gerrit.openafs.org/691 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear --- src/bozo/fsbnodeops.c | 6 ++---- src/config/stds.h | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bozo/fsbnodeops.c b/src/bozo/fsbnodeops.c index 160c244c5..3016af3c9 100644 --- a/src/bozo/fsbnodeops.c +++ b/src/bozo/fsbnodeops.c @@ -158,10 +158,8 @@ struct bnode_ops dafsbnode_ops = { * dropping type information */ -#ifndef AFS_HPUX_ENV -static_inline -#endif -struct bnode * fsbnode2bnode(struct fsbnode *abnode) { +static_inline struct bnode * +fsbnode2bnode(struct fsbnode *abnode) { return (struct bnode *) abnode; } diff --git a/src/config/stds.h b/src/config/stds.h index f1ff418ec..6dfee1278 100644 --- a/src/config/stds.h +++ b/src/config/stds.h @@ -304,8 +304,10 @@ typedef struct afsUUID afsUUID; #define static_inline __inline static #define hdr_static_inline(x) __inline static x #elif defined(AFS_HPUX_ENV) || defined(AFS_USR_HPUX_ENV) -#define static_inline static __inline -#define hdr_static_inline(x) static __inline x +/* The HPUX compiler can segfault on 'static __inline', so fall back to + * just 'static' so we can at least compile */ +#define static_inline static +#define hdr_static_inline(x) static x #elif defined(AFS_AIX_ENV) || defined(AFS_USR_AIX_ENV) #define static_inline static #define hdr_static_inline(x) static x -- 2.39.5