diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index 8d3a9aa9..ab5422ab 100644 --- a/include/xbps_api_impl.h +++ b/include/xbps_api_impl.h @@ -53,7 +53,7 @@ #define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | EXTRACT_FLAGS #ifndef __UNCONST -#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#define __UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) #endif /* libarchive compat */ diff --git a/lib/fetch/common.h b/lib/fetch/common.h index 3fde522c..647b184b 100644 --- a/lib/fetch/common.h +++ b/lib/fetch/common.h @@ -168,7 +168,7 @@ fetchIO *ftp_request(struct url *, const char *, const char *, #define CHECK_FLAG(x) (flags && strchr(flags, (x))) #ifndef __UNCONST -#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#define __UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) #endif #endif