From 4fa02164afe7d8751a7581dfe7ec8c46c9202a27 Mon Sep 17 00:00:00 2001 From: Franz Flasch Date: Wed, 15 Jan 2020 10:31:43 +0000 Subject: [PATCH] Make sds.h compatible for C++ --- sds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sds.h b/sds.h index 1bdb60d..c8ce74d 100644 --- a/sds.h +++ b/sds.h @@ -80,7 +80,7 @@ struct __attribute__ ((__packed__)) sdshdr64 { #define SDS_TYPE_64 4 #define SDS_TYPE_MASK 7 #define SDS_TYPE_BITS 3 -#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T))); +#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (struct sdshdr##T*)((s)-(sizeof(struct sdshdr##T))); #define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T)))) #define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS)