diff --git a/include/ffi.h.in b/include/ffi.h.in index df7d2cd..6b6de14 100644 --- a/include/ffi.h.in +++ b/include/ffi.h.in @@ -254,6 +254,9 @@ size_t ffi_java_raw_size (ffi_cif *cif); #ifdef _MSC_VER __declspec(align(8)) #endif +#ifdef __sgi +# pragma pack 8 +#endif typedef struct { char tramp[FFI_TRAMPOLINE_SIZE]; ffi_cif *cif; @@ -263,6 +266,9 @@ typedef struct { } ffi_closure __attribute__((aligned (8))); #else } ffi_closure; +# ifdef __sgi +# pragma pack 0 +# endif #endif void *ffi_closure_alloc (size_t size, void **code); diff --git a/src/java_raw_api.c b/src/java_raw_api.c index 9c5383e..522c8bf 100644 --- a/src/java_raw_api.c +++ b/src/java_raw_api.c @@ -311,7 +311,7 @@ ffi_java_translate_args (ffi_cif *cif, void *rvalue, ffi_raw_closure *cl = (ffi_raw_closure*)user_data; ffi_java_ptrarray_to_raw (cif, avalue, raw); - (*cl->fun) (cif, rvalue, raw, cl->user_data); + (*cl->fun) (cif, rvalue, (ffi_raw*)raw, cl->user_data); ffi_java_raw_to_rvalue (cif, rvalue); } diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h index c5f4e05..3ea9de4 100644 --- a/src/mips/ffitarget.h +++ b/src/mips/ffitarget.h @@ -43,7 +43,7 @@ # endif #if !defined(_MIPS_SIM) --- something is very wrong -- +# error -- something is very wrong -- #else # if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) # define FFI_MIPS_N32 @@ -51,7 +51,7 @@ # if (_MIPS_SIM==_ABIO32 && defined(_ABIO32)) # define FFI_MIPS_O32 # else --- this is an unsupported platform -- +# error -- this is an unsupported platform -- # endif # endif #endif