jief666 / hdimount

Mount apple disk image (HFS, APFS, partitioned or not, compressed, encrypted) via Fuse
GNU General Public License v3.0
33 stars 2 forks source link

compiling on openSUSE, Red Hat or Centos #8

Closed kapitainsky closed 2 years ago

kapitainsky commented 2 years ago

it is rather FYI and anybody who tries to build it:

it failes as there is no attr/xattr.h on openSUSE (neither on Red Hat nor Centos).

FIX:

in ./hdimount/src/HfsFuseVolume.cpp

I had to replace:

#ifdef __APPLE__
#  include <sys/xattr.h> // for ENOATTR
#elif defined(_MSC_VER)
#  define ENOATTR (93) // TODO better ?
#else
#  include <attr/xattr.h> // for ENOATTR
#endif

with:

#include <sys/xattr.h> // for ENOATTR
#define ENOATTR (93)

then it compiles and works no issue.

I guess it will be the same with Fedora.

kapitainsky commented 2 years ago

actually it would be better for all Linux to use:

include <sys/xattr.h>

define ENOATTR ENODATA

not all distros have attr/xattr.h but all should have sys/xattr.h