From c509b0f8727e3c57b57f6b7159e5a7425d533890 Mon Sep 17 00:00:00 2001 From: Sid Sabhnani Date: Wed, 27 Nov 2024 13:57:15 -0600 Subject: [PATCH] conditional compilation for macfuse --- fuseparts/_fusemodule.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fuseparts/_fusemodule.c b/fuseparts/_fusemodule.c index 8655af5..30a8f3b 100644 --- a/fuseparts/_fusemodule.c +++ b/fuseparts/_fusemodule.c @@ -923,8 +923,13 @@ flush_func(const char *path) EPILOGUE } +#ifdef __APPLE__ +static int +getxattr_func(const char *path, const char *name, char *value, size_t size, uint32_t position) +#else static int getxattr_func(const char *path, const char *name, char *value, size_t size) +#endif { #if PY_VERSION_HEX < 0x02050000 PROLOGUE( PyObject_CallFunction(getxattr_cb, "ssi", path, name, size) ) @@ -1020,10 +1025,15 @@ listxattr_func(const char *path, char *list, size_t size) EPILOGUE } - +#ifdef __APPLE__ +static int +setxattr_func(const char *path, const char *name, + const char *value, size_t size, int flags, uint32_t position) +#else static int setxattr_func(const char *path, const char *name, const char *value, size_t size, int flags) +#endif { PROLOGUE( #ifdef FIX_PATH_DECODING