]> wimlib.net Git - wimlib/commitdiff
ntfs-3g_capture.c: Use NTFS_MNT_RDONLY if defined
authorEric Biggers <ebiggers3@gmail.com>
Wed, 15 May 2013 04:28:22 +0000 (23:28 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 15 May 2013 04:28:22 +0000 (23:28 -0500)
Works around problems with the NTFS-3g headers where <ntfs-3g/volume.h> cannot
be included by itself, causing HAVE_NTFS_MNT_RDONLY to not get set by configure.

rpm/wimlib-minimal.spec [deleted file]
rpm/wimlib-without-ntfs-3g.spec [deleted file]
src/ntfs-3g_capture.c

diff --git a/rpm/wimlib-minimal.spec b/rpm/wimlib-minimal.spec
deleted file mode 100644 (file)
index e403bde..0000000
+++ /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 <ebiggers3@gmail.com>
-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 (file)
index 397d037..0000000
+++ /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 <ebiggers3@gmail.com>
-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
index 256e249431e32405fc45eaf1ecb58b60e0b0b0cf..9f03b6383b0aa057ec9dac664b3eed2fe960a10a 100644 (file)
@@ -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