]> wimlib.net Git - wimlib/commitdiff
Fix compiling with --without-fuse
authorEric Biggers <ebiggers3@gmail.com>
Mon, 8 Apr 2013 16:29:01 +0000 (11:29 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 8 Apr 2013 16:29:01 +0000 (11:29 -0500)
src/lookup_table.c
src/wimlib_internal.h

index 89b57b4e65ee757dc0485c61903750b866319091..432fca4796445852b439285eec61371d5a3a8612 100644 (file)
@@ -90,14 +90,14 @@ clone_lookup_table_entry(const struct wim_lookup_table_entry *old)
        case RESOURCE_WIN32:
        case RESOURCE_WIN32_ENCRYPTED:
 #endif
+       case RESOURCE_IN_FILE_ON_DISK:
 #ifdef WITH_FUSE
        case RESOURCE_IN_STAGING_FILE:
-#endif
-       case RESOURCE_IN_FILE_ON_DISK:
                BUILD_BUG_ON((void*)&old->file_on_disk !=
                             (void*)&old->staging_file_name);
-               new->staging_file_name = TSTRDUP(old->staging_file_name);
-               if (!new->staging_file_name)
+#endif
+               new->file_on_disk = TSTRDUP(old->file_on_disk);
+               if (!new->file_on_disk)
                        goto out_free;
                break;
        case RESOURCE_IN_ATTACHED_BUFFER:
@@ -144,14 +144,17 @@ free_lookup_table_entry(struct wim_lookup_table_entry *lte)
 {
        if (lte) {
                switch (lte->resource_location) {
-               case RESOURCE_IN_STAGING_FILE:
-               case RESOURCE_IN_ATTACHED_BUFFER:
-               case RESOURCE_IN_FILE_ON_DISK:
-#ifdef __WIN32__
+       #ifdef __WIN32__
                case RESOURCE_WIN32:
-#endif
+               case RESOURCE_WIN32_ENCRYPTED:
+       #endif
+       #ifdef WITH_FUSE
+               case RESOURCE_IN_STAGING_FILE:
                        BUILD_BUG_ON((void*)&lte->file_on_disk !=
                                     (void*)&lte->staging_file_name);
+       #endif
+               case RESOURCE_IN_FILE_ON_DISK:
+               case RESOURCE_IN_ATTACHED_BUFFER:
                        BUILD_BUG_ON((void*)&lte->file_on_disk !=
                                     (void*)&lte->attached_buffer);
                        FREE(lte->file_on_disk);
@@ -673,10 +676,12 @@ print_lookup_table_entry(const struct wim_lookup_table_entry *lte, FILE *out)
                tfprintf(out, T("File on Disk      = `%"TS"'\n"),
                         lte->file_on_disk);
                break;
+#ifdef WITH_FUSE
        case RESOURCE_IN_STAGING_FILE:
                tfprintf(out, T("Staging File      = `%"TS"'\n"),
                                lte->staging_file_name);
                break;
+#endif
        default:
                break;
        }
index 6528b77f073e4f522e0f2999b6a35853a2f4bb91..6396c00ad03776dfaff463a80541182cb0a90eb5 100644 (file)
@@ -31,7 +31,7 @@
 #include "list.h"
 #include "wimlib.h"
 
-#ifdef WITH_FUSE
+#if defined(WITH_FUSE) || defined(ENABLE_MULTITHREADED_COMPRESSION)
 #include <pthread.h>
 #endif