summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:30:17 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:30:17 +0000
commitf40f36c6a990bcc502cad4a343644f8354fec604 (patch)
tree0dc49c079af3dac88a147d0754d2cf994767b3fb /src/main.c
parent9aad0ed8c52b517da4f16b167a9e8926bb5d08be (diff)
Fix build against libpthread
* configure.ac: Link against libpthread instead of libthreads. * fuse.pc.in: Likewise. * src/fuse_i.h (libfuse_ctx): Declare TLS variable. (netnode): Turn lock field from struct mutex to pthread_mutex_t. * src/main.c (libfuse_ctx): Define TLS variable. (fuse_get_context): Use libfuse_ctx instead of cthreads TSD. * src/netfs.c: Likewise. Use pthread functions instead of cthreads functions. Use fixed stat structure. * src/netnode.c: Likewise. * src/node.c: Likewise.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 923bc3dd7..e9a402f7d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,6 +37,8 @@ const struct fuse_operations_compat22 *fuse_ops_compat22 = NULL;
const struct fuse_operations_compat2 *fuse_ops_compat2 = NULL;
const struct fuse_operations *fuse_ops25 = NULL;
+__thread struct fuse_context *libfuse_ctx;
+
/* the port where to write out debug messages to, NULL to omit these */
FILE *debug_port = NULL;
@@ -598,6 +600,5 @@ fuse_exited(struct fuse *f)
struct fuse_context *
fuse_get_context(void)
{
- struct fuse_context *ctx = cthread_data(cthread_self());
- return ctx;
+ return libfuse_ctx;
}