diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx index 3013e91c6341..75c3d9d90d36 100644 --- a/sal/osl/unx/system.hxx +++ b/sal/osl/unx/system.hxx @@ -309,9 +309,12 @@ int macxp_resolveAlias(char *path, int buflen); # define INIT_GROUPS(name, gid) ((setgid((gid)) == 0) && (initgroups((name), (gid)) == 0)) #endif -#ifndef PTHREAD_VALUE -# define PTHREAD_VALUE(t) (t) +#if defined MACOSX +#define PTHREAD_VALUE(t) reinterpret_cast(t) +#else +#define PTHREAD_VALUE(t) (t) #endif + #ifndef PTHREAD_NONE # define PTHREAD_NONE _pthread_none_ # ifndef PTHREAD_NONE_INIT diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 2dc913c3c554..0ca411383c27 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -551,7 +551,7 @@ void SAL_CALL osl_setThreadName(char const * name) { /* osl_getThreadIdentifier @@@ see TODO @@@ */ /*****************************************************************************/ -#define HASHID(x) (reinterpret_cast(PTHREAD_VALUE(x)) % HashSize) +#define HASHID(x) ((unsigned long)PTHREAD_VALUE(x) % HashSize) typedef struct _HashEntry {