From: Eric Biggers Date: Wed, 15 May 2013 04:28:22 +0000 (-0500) Subject: ntfs-3g_capture.c: Use NTFS_MNT_RDONLY if defined X-Git-Tag: v1.4.0~41 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=6db2e4847a0a509e26ae41b497c7b367ecc20a2e ntfs-3g_capture.c: Use NTFS_MNT_RDONLY if defined Works around problems with the NTFS-3g headers where cannot be included by itself, causing HAVE_NTFS_MNT_RDONLY to not get set by configure. --- diff --git a/rpm/wimlib-minimal.spec b/rpm/wimlib-minimal.spec deleted file mode 100644 index e403bde9..00000000 --- a/rpm/wimlib-minimal.spec +++ /dev/null @@ -1,69 +0,0 @@ -Summary: Library to extract, create, and modify WIM files -Name: wimlib -Version: 1.4.0 -Release: 1 -License: GPLv3+ -Group: System/Libraries -URL: http://wimlib.sourceforge.net -Packager: Eric Biggers -Source: http://downloads.sourceforge.net/wimlib/wimlib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -Requires: libxml2, openssl -BuildRequires: libxml2-devel, openssl-devel -%description -wimlib is a library that can be used to create, extract, and modify files in the -Windows Imaging Format. These files are normally created by the 'imagex.exe' -program on Windows, but this library provides a free implementation of 'imagex' -for UNIX-based systems. wimlib supports mounting WIM files, just like -imagex.exe. - -%package devel -Summary: Development files for wimlib -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description devel -Development files for wimlib - -%prep -%setup -q -n %{name}-%{version} - -%build -%configure --prefix=/usr \ - --disable-rpath \ - --with-libcrypto \ - --without-ntfs-3g \ - --without-fuse \ - --disable-xattr \ - --disable-multithreaded-compression \ - --disable-custom-memory-allocator \ - --disable-assertions -%__make %{?_smp_mflags} - -%check -make check - -%install -%__rm -rf %{buildroot} -%__make DESTDIR=%{buildroot} install - -%clean -%__rm -rf %{buildroot} - -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - -%files -%defattr(-, root, root) -%doc AUTHORS COPYING README TODO -%{_bindir}/imagex -%{_bindir}/mkwinpeimg -%{_libdir}/libwim.so* -%doc %{_mandir}/man1/*.1.gz - -%files devel -%defattr(-, root, root) -%{_libdir}/libwim.a -%{_libdir}/libwim.la -%{_includedir}/wimlib.h -%{_libdir}/pkgconfig/wimlib.pc diff --git a/rpm/wimlib-without-ntfs-3g.spec b/rpm/wimlib-without-ntfs-3g.spec deleted file mode 100644 index 397d0373..00000000 --- a/rpm/wimlib-without-ntfs-3g.spec +++ /dev/null @@ -1,65 +0,0 @@ -Summary: Library to extract, create, and modify WIM files -Name: wimlib -Version: 1.4.0 -Release: 1 -License: GPLv3+ -Group: System/Libraries -URL: http://wimlib.sourceforge.net -Packager: Eric Biggers -Source: http://downloads.sourceforge.net/wimlib/wimlib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -Requires: libxml2, fuse-libs, fuse, openssl -BuildRequires: libxml2-devel, fuse-devel, openssl-devel, libattr-devel, fuse -%description -wimlib is a library that can be used to create, extract, and modify files in the -Windows Imaging Format. These files are normally created by the 'imagex.exe' -program on Windows, but this library provides a free implementation of 'imagex' -for UNIX-based systems. wimlib supports mounting WIM files, just like -imagex.exe. - -%package devel -Summary: Development files for wimlib -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description devel -Development files for wimlib - -%prep -%setup -q -n %{name}-%{version} - -%build -%configure --prefix=/usr \ - --disable-rpath \ - --with-libcrypto \ - --without-ntfs-3g \ - --enable-xattr -%__make %{?_smp_mflags} - -%check -make check - -%install -%__rm -rf %{buildroot} -%__make DESTDIR=%{buildroot} install - -%clean -%__rm -rf %{buildroot} - -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - -%files -%defattr(-, root, root) -%doc AUTHORS COPYING README TODO -%{_bindir}/imagex -%{_bindir}/mkwinpeimg -%{_libdir}/libwim.so* -%doc %{_mandir}/man1/*.1.gz - -%files devel -%defattr(-, root, root) -%{_libdir}/libwim.a -%{_libdir}/libwim.la -%{_includedir}/wimlib.h -%{_libdir}/pkgconfig/wimlib.pc diff --git a/src/ntfs-3g_capture.c b/src/ntfs-3g_capture.c index 256e2494..9f03b638 100644 --- a/src/ntfs-3g_capture.c +++ b/src/ntfs-3g_capture.c @@ -725,10 +725,10 @@ build_dentry_tree_ntfs(struct wim_dentry **root_p, DEBUG("Mounting NTFS volume `%s' read-only", device); -#ifdef HAVE_NTFS_MNT_RDONLY +#if defined(NTFS_MNT_RDONLY) /* NTFS-3g 2013 */ vol = ntfs_mount(device, NTFS_MNT_RDONLY); -#else +#elif defined(MS_RDONLY) /* NTFS-3g 2011, 2012 */ vol = ntfs_mount(device, MS_RDONLY); #endif