From 09d405fb3e85f4783fad2757c680f2826dd9893a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 20 Apr 2023 05:04:08 +0100 Subject: shared: fix pointer type in UNCONST Thanks to vapier for noticing. --- src/shared/helpers.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared') diff --git a/src/shared/helpers.h b/src/shared/helpers.h index 0303937b..9cf263be 100644 --- a/src/shared/helpers.h +++ b/src/shared/helpers.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,7 @@ #define ERRX fprintf (stderr, "out of memory\n"); exit (1) -#define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) #define RC_UNUSED __attribute__((__unused__)) #define RC_NORETURN __attribute__((__noreturn__)) -- cgit v1.2.3