Last active
August 29, 2015 14:12
-
-
Save wtnb75/160909c2b1a37c6d9d0d to your computer and use it in GitHub Desktop.
s3fs-fuse 1.78 + osxfuse patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- s3fs-fuse-1.78/configure.ac.orig 2014-09-15 22:30:51.000000000 +0900 | |
+++ s3fs-fuse-1.78/configure.ac 2014-12-30 20:27:36.000000000 +0900 | |
@@ -156,13 +156,13 @@ dnl | |
dnl For PKG_CONFIG before checking nss/gnutls. | |
dnl this is redundant checking, but we need checking before following. | |
dnl | |
-PKG_CHECK_MODULES([common_lib_checking], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6]) | |
+PKG_CHECK_MODULES([common_lib_checking], [osxfuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >= 2.6]) | |
AC_MSG_CHECKING([compile s3fs with]) | |
case "${auth_lib}" in | |
openssl) | |
AC_MSG_RESULT(OpenSSL) | |
- PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9]) | |
+ PKG_CHECK_MODULES([DEPS], [osxfuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9]) | |
;; | |
gnutls) | |
AC_MSG_RESULT(GnuTLS-gcrypt) | |
@@ -171,7 +171,7 @@ gnutls) | |
AS_IF([test "$gnutls_nettle" = ""], [AC_CHECK_LIB(gcrypt, gcry_control, [gnutls_nettle=0])]) | |
AS_IF([test $gnutls_nettle = 0], | |
[ | |
- PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 gnutls >= 2.12.0 ]) | |
+ PKG_CHECK_MODULES([DEPS], [osxfuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >= 2.6 gnutls >= 2.12.0 ]) | |
LIBS="-lgnutls -lgcrypt $LIBS" | |
AC_MSG_CHECKING([gnutls is build with]) | |
AC_MSG_RESULT(gcrypt) | |
@@ -185,7 +185,7 @@ nettle) | |
AS_IF([test "$gnutls_nettle" = ""], [AC_CHECK_LIB(nettle, nettle_MD5Init, [gnutls_nettle=1])]) | |
AS_IF([test $gnutls_nettle = 1], | |
[ | |
- PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 nettle >= 2.7.1 ]) | |
+ PKG_CHECK_MODULES([DEPS], [osxfuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >= 2.6 nettle >= 2.7.1 ]) | |
LIBS="-lgnutls -lnettle $LIBS" | |
AC_MSG_CHECKING([gnutls is build with]) | |
AC_MSG_RESULT(nettle) | |
@@ -194,7 +194,7 @@ nettle) | |
;; | |
nss) | |
AC_MSG_RESULT(NSS) | |
- PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 nss >= 3.15.0 ]) | |
+ PKG_CHECK_MODULES([DEPS], [osxfuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >= 2.6 nss >= 3.15.0 ]) | |
;; | |
*) | |
AC_MSG_ERROR([unknown ssl library type.]) | |
--- s3fs-fuse-1.78/src/openssl_auth.cpp.orig 2014-09-15 22:30:51.000000000 +0900 | |
+++ s3fs-fuse-1.78/src/openssl_auth.cpp 2014-12-30 20:23:23.000000000 +0900 | |
@@ -94,7 +94,13 @@ static void s3fs_crypt_mutex_lock(int mo | |
static unsigned long s3fs_crypt_get_threadid(void) | |
{ | |
+#ifdef __APPLE__ | |
+ uint64_t tid; | |
+ pthread_threadid_np(NULL, &tid); | |
+ return tid; | |
+#else | |
return static_cast<unsigned long>(pthread_self()); | |
+#endif | |
} | |
static struct CRYPTO_dynlock_value* s3fs_dyn_crypt_mutex(const char* file, int line) | |
--- s3fs-fuse-1.78/src/s3fs.cpp.orig 2014-09-15 22:30:51.000000000 +0900 | |
+++ s3fs-fuse-1.78/src/s3fs.cpp 2014-12-30 20:23:23.000000000 +0900 | |
@@ -2674,9 +2674,11 @@ static void* s3fs_init(struct fuse_conn_ | |
} | |
// Investigate system capabilities | |
+#if 0 | |
if((unsigned int)conn->capable & FUSE_CAP_ATOMIC_O_TRUNC){ | |
conn->want |= FUSE_CAP_ATOMIC_O_TRUNC; | |
} | |
+#endif | |
// cache | |
if(is_remove_cache && !FdManager::DeleteCacheDirectory()){ | |
DPRNINFO("Could not inilialize cache directory."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment