diff --git a/config.h.in b/config.h.in index 2c599863..0b323f13 100644 --- a/config.h.in +++ b/config.h.in @@ -58,6 +58,9 @@ double. */ #undef HAVE_LONG_DOUBLE +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_ENDIAN_H + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC @@ -167,6 +170,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H diff --git a/configure b/configure index 53b767e4..66a98f89 100755 --- a/configure +++ b/configure @@ -8463,6 +8463,8 @@ fi + + @@ -8470,7 +8472,7 @@ for ac_header in fcntl.h libintl.h limits.h locale.h mntent.h stddef.h \ stdint.h stdlib.h stdio.h stdarg.h string.h strings.h errno.h time.h \ unistd.h utime.h wchar.h getopt.h features.h endian.h byteswap.h \ sys/endian.h sys/param.h sys/ioctl.h sys/mount.h sys/stat.h \ - sys/types.h linux/major.h linux/fd.h + sys/types.h sys/vfs.h linux/major.h linux/fd.h machine/endian.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then diff --git a/configure.ac b/configure.ac index 9ca6b631..fcdddfd1 100644 --- a/configure.ac +++ b/configure.ac @@ -169,7 +169,7 @@ AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h \ stdint.h stdlib.h stdio.h stdarg.h string.h strings.h errno.h time.h \ unistd.h utime.h wchar.h getopt.h features.h endian.h byteswap.h \ sys/endian.h sys/param.h sys/ioctl.h sys/mount.h sys/stat.h \ - sys/types.h linux/major.h linux/fd.h]) + sys/types.h sys/vfs.h linux/major.h linux/fd.h machine/endian.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL diff --git a/include/endians.h b/include/endians.h index 4a5c2a24..b57bdef8 100644 --- a/include/endians.h +++ b/include/endians.h @@ -39,6 +39,9 @@ #ifdef HAVE_SYS_ENDIAN_H # include #endif +#ifdef HAVE_MACHINE_ENDIAN_H +# include +#endif #ifndef __BYTE_ORDER # ifdef _BYTE_ORDER # define __BYTE_ORDER _BYTE_ORDER diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 6b5e7349..c1a927bf 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -18,7 +18,9 @@ #include #include #include -#include +#ifdef HAVE_SYS_VFS_H +# include +#endif #include #include #include diff --git a/ntfsprogs/utils.h b/ntfsprogs/utils.h index 55205614..c26bcfa7 100644 --- a/ntfsprogs/utils.h +++ b/ntfsprogs/utils.h @@ -39,8 +39,8 @@ extern const char *ntfs_gpl; #define PATH_SEP '/' #define MAX_PATH 1024 -#if (REG_NOERROR != 0) -#define REG_NOERROR REG_OKAY +#if !defined(REG_NOERROR) || (REG_NOERROR != 0) +# define REG_NOERROR REG_OKAY #endif #define GEN_PRINTF(NAME, STREAM, CONTROL, TRIGGER) \