From 28d82c9ccdfe4bca05d803bd76745f4a15b6353b Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Wed, 22 Oct 2014 14:21:01 +0000 Subject: [PATCH] Fixed #68(FreeBSD issue) --- src/openssl_auth.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openssl_auth.cpp b/src/openssl_auth.cpp index 50f3117..8476854 100644 --- a/src/openssl_auth.cpp +++ b/src/openssl_auth.cpp @@ -94,7 +94,9 @@ static void s3fs_crypt_mutex_lock(int mode, int pos, const char* file, int line) static unsigned long s3fs_crypt_get_threadid(void) { - return static_cast(pthread_self()); + // For FreeBSD etc, some system's pthread_t is structure pointer. + // Then we use cast like C style(not C++) instead of ifdef. + return (unsigned long)(pthread_self()); } static struct CRYPTO_dynlock_value* s3fs_dyn_crypt_mutex(const char* file, int line)