xar icon indicating copy to clipboard operation
xar copied to clipboard

‘EXT2_ECOMPR_FL’ undeclared

Open gagern opened this issue 9 years ago • 2 comments

The EXT2_ECOMPR_FL flag used here and here was moved to private API in https://github.com/torvalds/linux/commit/f7699f2b0114fcd0ea5ad5f8aa2142f1bcc27fd0. Its more public alias FS_ECOMPR_FL was removed in https://github.com/torvalds/linux/commit/68ce7bfcd995a8a393b1b14fa67dbc16fa3dc784, to be replaced by FS_ENCRYPT_FL using the same code. https://github.com/torvalds/linux/commit/3edc18d84540b94c0eba9226d01a8cbe4c162b55 also comments on this reassignment in relation to EXT4_ENCRYPT_FL. Perhaps a look at the version can be used to distinguish these two possible meanings of the term? Or perhaps EXT2_ECOMPR_FL is actually unused, and therefore EXT4_ENCRYPT_FL is the only valid meaning?

Anyway, the code as it is doesn't compile against latest linux headers, leading to error messages like

error: ‘EXT2_ECOMPR_FL’ undeclared

as evidenced in Gentoo bug 583668.

gagern avatar May 31 '16 08:05 gagern

Here is workaround from Void package:


--- lib/ext2.c.orig
+++ lib/ext2.c
@@ -139,8 +139,10 @@
    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) )
@@ -225,8 +227,10 @@
    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 ) 

stobenski avatar Oct 02 '16 09:10 stobenski

I noticed that https://github.com/KubaKaszycki/xar/commit/69cd5f215accd96406368b9a7696fb1c3c66712f does include this workaround, too.

gagern avatar Jan 01 '17 13:01 gagern