include: Fix build on OpenIndiana.
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Oct 2012 08:29:54 +0000 (10:29 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Oct 2012 08:29:54 +0000 (10:29 +0200)
src/include/cmocka.h

index 7aa31c8..9720f04 100755 (executable)
@@ -88,14 +88,20 @@ typedef unsigned long long uintptr_t */
 #else /* _WIN32 */
 
 /* ILP32 and LP64 platforms */
-#ifdef __WORDSIZE
+#ifdef __WORDSIZE /* glibc */
 # if __WORDSIZE == 64
 typedef unsigned long int uintptr_t;
 # else
 typedef unsigned int uintptr_t;
 # endif /* __WORDSIZE == 64 */
 #else /* __WORDSIZE */
+
+# if defined(_LP64) || defined(_I32LPx)
 typedef unsigned long int uintptr_t;
+# else
+typedef unsigned int uintptr_t;
+# endif
+
 #endif /* __WORDSIZE */
 
 #endif /* _WIN32 */