From 575704a99a4f80302c2023f8e618c99af96ff9e3 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 17 May 2012 18:44:39 +0200 Subject: fix for Linux >=3.1 fixed an illegal pointer cast in test9 --- src/port/sys_internal.h | 2 +- tests/test9.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/port/sys_internal.h b/src/port/sys_internal.h index b846810..52fcae3 100644 --- a/src/port/sys_internal.h +++ b/src/port/sys_internal.h @@ -34,7 +34,7 @@ #endif /* defined OS_MINOR_VERSION == 6 */ #else #if OS_MAJOR_VERSION == 3 -#if OS_MINOR_VERSION == 0 +#if OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 3 #define _XOPEN_SOURCE 600 #define HAVE_STRDUP #else diff --git a/tests/test9.cpp b/tests/test9.cpp index cad0f05..18aa57e 100644 --- a/tests/test9.cpp +++ b/tests/test9.cpp @@ -163,15 +163,15 @@ int main( ) { MUTEX_SETUP( cout_mutex ); - for( int i = 0; i < NOF_PRODUCERS ; i++ ) { + for( intptr_t i = 0; i < NOF_PRODUCERS ; i++ ) { THREAD_CREATE( &prod[i], produce, (void *)i ); } - for( int i = 0; i < NOF_CONSUMERS; i++ ) { + for( intptr_t i = 0; i < NOF_CONSUMERS; i++ ) { THREAD_CREATE( &cons[i], consume, (void *)i ); } - for( int i = 0; i < NOF_PRODUCERS; i++ ) { + for( intptr_t i = 0; i < NOF_PRODUCERS; i++ ) { THREAD_JOIN( prod[i] ); } -- cgit v1.2.3-54-g00ecf