From 369113aa8eccb06c94cc6d5550816e76f43ed30d Mon Sep 17 00:00:00 2001 From: typeling1578 <59644555+typeling1578@users.noreply.github.com> Date: Thu, 21 Jul 2022 04:50:20 +0900 Subject: [PATCH] Fix build error. https://github.com/mackyle/xar/issues/10 --- xar/lib/ext2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xar/lib/ext2.c b/xar/lib/ext2.c index 224dab3..ed8e821 100644 --- a/xar/lib/ext2.c +++ b/xar/lib/ext2.c @@ -140,8 +140,10 @@ int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file, const char *bu if(! (flags & ~EXT2_NOCOMPR_FL) ) x_addprop(f, "NoCompBlock"); #endif +#ifdef EXT2_ECOMPR_FL if(! (flags & ~EXT2_ECOMPR_FL) ) x_addprop(f, "CompError"); +#endif if(! (flags & ~EXT2_BTREE_FL) ) x_addprop(f, "BTree"); if(! (flags & ~EXT2_INDEX_FL) ) @@ -229,8 +231,10 @@ int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, if( e2prop_get(f, "NoCompBlock", (char **)&tmp) == 0 ) flags |= EXT2_NOCOMPR_FL ; #endif +#ifdef EXT2_ECOMPR_FL if( e2prop_get(f, "CompError", (char **)&tmp) == 0 ) flags |= EXT2_ECOMPR_FL ; +#endif if( e2prop_get(f, "BTree", (char **)&tmp) == 0 ) flags |= EXT2_BTREE_FL ; if( e2prop_get(f, "HashIndexed", (char **)&tmp) == 0 )