Resort to a version check for them, as they do not exist in older
versions.
---
 daemon/tsk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/daemon/tsk.c b/daemon/tsk.c
index af803d749..ad10d74fe 100644
--- a/daemon/tsk.c
+++ b/daemon/tsk.c
@@ -241,6 +241,9 @@ file_type (TSK_FS_FILE *fsfile)
     case TSK_FS_NAME_TYPE_SHAD: return 'h';
     case TSK_FS_NAME_TYPE_WHT: return 'w';
     case TSK_FS_NAME_TYPE_VIRT: return 'u';  /* Temp files created by TSK */
+#if TSK_VERSION_NUM >= 0x040500ff
+    case TSK_FS_NAME_TYPE_VIRT_DIR: return 'u';  /* Temp files created by TSK 
*/
+#endif
     }
   else if (fsfile->meta != NULL &&
            fsfile->meta->type < TSK_FS_META_TYPE_STR_MAX)
@@ -256,6 +259,9 @@ file_type (TSK_FS_FILE *fsfile)
     case TSK_FS_META_TYPE_SOCK: return 's';
     case TSK_FS_META_TYPE_WHT: return 'w';
     case TSK_FS_META_TYPE_VIRT: return 'u';  /* Temp files created by TSK */
+#if TSK_VERSION_NUM >= 0x040500ff
+    case TSK_FS_META_TYPE_VIRT_DIR: return 'u';  /* Temp files created by TSK 
*/
+#endif
     }
 
   return 'u';
-- 
2.14.3

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to