diff --git a/src/jrd/isc_sync.cpp b/src/jrd/isc_sync.cpp index 47ca749d96..f9a7877f74 100644 --- a/src/jrd/isc_sync.cpp +++ b/src/jrd/isc_sync.cpp @@ -115,7 +115,13 @@ static UCHAR *next_shared_memory; #if defined(FREEBSD) || defined(NETBSD) || defined(SINIXZ) #include #else +#ifdef SOLARIS +extern "C" { #include +}; +#else +#include +#endif #endif #include @@ -142,9 +148,11 @@ static UCHAR *next_shared_memory; #define SIGVEC FPTR_INT #endif -#ifdef HAVE_SIGACTION +#ifdef HAVE_SIGACTION +#ifndef SOLARIS #define SIGVEC struct sigaction #endif +#endif #ifndef GDS_RELAY #define GDS_RELAY "/bin/gds_relay" @@ -504,7 +512,7 @@ int ISC_event_wait(SSHORT count, EVENT* events, SLONG* values, SLONG micro_seconds, - void (*timeout_handler)(), + FPTR_VOID timeout_handler, void* handler_arg) { /************************************** diff --git a/src/jrd/thd.cpp b/src/jrd/thd.cpp index ff9b114296..890a4213cc 100644 --- a/src/jrd/thd.cpp +++ b/src/jrd/thd.cpp @@ -56,6 +56,12 @@ #endif +#ifdef SOLARIS +#include +#include +#endif + + extern "C" { @@ -203,7 +209,7 @@ THDD THD_get_specific(void) **************************************/ THDD current_context; - if (thr_getspecific(specific_key, ¤t_context)) { + if (thr_getspecific(specific_key, (void **) ¤t_context)) { ib_perror("thr_getspecific"); exit(1); } @@ -541,7 +547,7 @@ int THD_mutex_destroy(MUTX_T * mutex) * **************************************/ - return mutex_destroy(mutex); + return mutex_destroy(&mutex->mutx_mutex); } @@ -557,7 +563,7 @@ int THD_mutex_init(MUTX_T * mutex) * **************************************/ - return mutex_init(mutex, USYNC_THREAD, NULL); + return mutex_init(&mutex->mutx_mutex, USYNC_THREAD, NULL); } @@ -573,7 +579,7 @@ int THD_mutex_lock(MUTX_T * mutex) * **************************************/ - return mutex_lock(mutex); + return mutex_lock(&mutex->mutx_mutex); } @@ -589,7 +595,7 @@ int THD_mutex_unlock(MUTX_T * mutex) * **************************************/ - return mutex_unlock(mutex); + return mutex_unlock(&mutex->mutx_mutex); } #endif #endif @@ -1968,10 +1974,10 @@ static int thread_start( if (rval = thr_sigsetmask(SIG_SETMASK, &new_mask, &orig_mask)) return rval; #if (defined SUPERCLIENT || defined SUPERSERVER) - rval = thr_create(NULL, 0, routine, arg, THR_DETACHED, &thread_id); + rval = thr_create(NULL, 0, (void* (*)(void*) )routine, arg, THR_DETACHED, &thread_id); #else rval = - thr_create(NULL, 0, routine, arg, (THR_BOUND | THR_DETACHED), + thr_create(NULL, 0, (void* (*)(void*) ) routine, arg, (THR_BOUND | THR_DETACHED), &thread_id); #endif (void) thr_sigsetmask(SIG_SETMASK, &orig_mask, NULL);