diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index 8c855d7a8..95d720dd6 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -37,6 +37,9 @@ #include #include #include +#ifdef HAVE_STDINT_H +#include +#endif #include #include @@ -138,6 +141,12 @@ typedef int ssize_t; ROKEN_CPP_START +#ifdef HAVE_UINTPTR_T +#define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x)) +#else +#define rk_UNCONST(x) ((void *)(unsigned long)(const void *)(x)) +#endif + #if !defined(HAVE_SETSID) && defined(HAVE__SETSID) #define setsid _setsid #endif