]> wimlib.net Git - wimlib/blobdiff - src/extract.c
extract.c: Don't compile unneeded code when WITH_NTFS_3G undefined
[wimlib] / src / extract.c
index 42a52eb54ccf312398e5d85f16b9bfa7a94bda3a..65e60dead1291bff6796b26cc4efd7f811313776 100644 (file)
@@ -131,7 +131,9 @@ read_pwm_stream_header(WIMStruct *pwm, struct wim_lookup_table_entry *lte,
        if (ret)
                goto read_error;
 
-       if ((flags & PWM_ALLOW_WIM_HDR) && buf.stream_hdr.magic == PWM_MAGIC) {
+       if ((flags & PWM_ALLOW_WIM_HDR) &&
+           le64_to_cpu(buf.stream_hdr.magic) == PWM_MAGIC)
+       {
                BUILD_BUG_ON(sizeof(buf.pwm_hdr) < sizeof(buf.stream_hdr));
                ret = full_read(&pwm->in_fd, &buf.stream_hdr + 1,
                                sizeof(buf.pwm_hdr) - sizeof(buf.stream_hdr));
@@ -610,12 +612,14 @@ dentry_calculate_extraction_name(struct wim_dentry *dentry,
        if (dentry_is_root(dentry))
                return 0;
 
+#ifdef WITH_NTFS_3G
        if (ctx->extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) {
                dentry->d_extraction_name = dentry->file_name;
                dentry->d_extraction_name_nchars = dentry->file_name_nbytes /
                                                   sizeof(utf16lechar);
                return 0;
        }
+#endif
 
        if (!ctx->supported_features.case_sensitive_filenames) {
                struct wim_dentry *other;