8000 Fails to build with macFUSE · Issue #180 · libguestfs/libguestfs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fails to build with macFUSE #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mohd-akram opened this issue Apr 13, 2025 · 3 comments
Open

Fails to build with macFUSE #180

mohd-akram opened this issue Apr 13, 2025 · 3 comments

Comments

@mohd-akram
Copy link

Getting this while trying to build master (7d561ee):

fuse.c:950:15: error: incompatible function pointer types initializing 'int (*)(const char *, const char *, const char *, size_t, int, uint32_t)' (aka 'int (*)(const char *, const char *, const char *, unsigned long, int, unsigned int)') with an expression of type 'int (const char *, const char *, const char *, size_t, int)' (aka 'int (const char *, const char *, const char *, unsigned long, int)') [-Wincompatible-function-pointer-types]
  950 |   .setxattr     = mount_local_setxattr,
      |                   ^~~~~~~~~~~~~~~~~~~~
fuse.c:951:15: error: incompatible function pointer types initializing 'int (*)(const char *, const char *, char *, size_t, uint32_t)' (aka 'int (*)(const char *, const char *, char *, unsigned long, unsigned int)') with an expression of type 'int (const char *, const char *, char *, size_t)' (aka 'int (const char *, const char *, char *, unsigned long)') [-Wincompatible-function-pointer-types]
  951 |   .getxattr     = mount_local_getxattr,
      |                   ^~~~~~~~~~~~~~~~~~~~
@mohd-akram
Copy link
Author

This is due to macfuse/macfuse#1065.

@mohd-akram mohd-akram changed the title error: incompatible function pointer types when building with Clang Fails to build with macFUSE Apr 13, 2025
@rwmjones
Copy link
Member

Thanks for finding that. It should be possible to add #ifdef __APPLE__ to our code if there's a reason for the Apple / libfuse difference.

@mohd-akram
Copy link
Author

macFUSE suggests adding it, and it seems other FUSE projects have done the same.

rwmjones added a commit to rwmjones/libguestfs that referenced this issue Apr 22, 2025
macOS macfuse has an extra parameter for the setxattr and getxattr
FUSE callbacks.  It's unclear what this is for but we can ignore it.

Reported-by: Mohamed Akram
Fixes: libguestfs#180
Related: macfuse/macfuse#1065
rwmjones added a commit to rwmjones/libguestfs that referenced this issue Apr 27, 2025
macOS macfuse has an extra options parameter for the setxattr and
getxattr FUSE callbacks.  The possible options are documented below.
However the underlying libguestfs APIs don't allow us to act on these
flags, so we ignore them for now.

(from https://manp.gs/mac/2/setxattr)

  XATTR_NOFOLLOW
    do not follow symbolic links. setxattr() normally sets attributes
    on the target of path if it is a symbolic link. With this option,
    setxattr() will act on the link itself.
  XATTR_NOFOLLOW_ANY
    do not follow any symbolic links encountered during pathname
    resolution. An error is returned if a symlink is encountered
    before the last component of path.
  XATTR_CREATE
    fail if the named attribute already exists.
  XATTR_REPLACE
    fail if the named attribute does not exist. Failure to specify
    XATTR_REPLACE or XATTR_CREATE allows creation and replacement.

Reported-by: Mohamed Akram
Fixes: libguestfs#180
Related: macfuse/macfuse#1065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0