aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-20 05:04:08 +0100
committerMike Frysinger <vapier@gmail.com>2023-04-20 07:50:49 -0400
commit09d405fb3e85f4783fad2757c680f2826dd9893a (patch)
tree303d27861cf231d5f72696d727db9755ea73e6e7 /src
parent36e4e04ba9ae654ffc677844074fa80e49109033 (diff)
shared: fix pointer type in UNCONST
Thanks to vapier for noticing.
Diffstat (limited to 'src')
-rw-r--r--src/shared/helpers.h3
1 files changed, 2 insertions, 1 deletions
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 <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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__))