summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-05-17 18:44:39 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-05-17 18:44:39 +0200
commit575704a99a4f80302c2023f8e618c99af96ff9e3 (patch)
tree6327c25f0171cdcc42136418c2e8580fb267fdc2
parentff4417a0cc344eed56d5ddd42b2a4cfd69b17c43 (diff)
downloadsqlitexx-575704a99a4f80302c2023f8e618c99af96ff9e3.tar.gz
sqlitexx-575704a99a4f80302c2023f8e618c99af96ff9e3.tar.bz2
fix for Linux >=3.1
fixed an illegal pointer cast in test9
-rw-r--r--src/port/sys_internal.h2
-rw-r--r--tests/test9.cpp6
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] );
}