From 9066cfd6827e8bb9692911802380f784e41563ca Mon Sep 17 00:00:00 2001 From: John Date: Tue, 19 Mar 2019 22:08:20 +0000 Subject: [PATCH] Fix linker errors on some compilers due to sdslen() Former-commit-id: 6aa162f6ff528951894b1af80f5f7b81562e1b37 --- src/sds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sds.h b/src/sds.h index 1985fb263..4ae1e4dfd 100644 --- a/src/sds.h +++ b/src/sds.h @@ -98,7 +98,7 @@ struct __attribute__ ((__packed__)) sdshdr64 { #define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T)))) #define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS) -inline size_t sdslen(const sds s) { +static inline size_t sdslen(const sds s) { unsigned char flags = s[-1]; int type = flags & SDS_TYPE_MASK;