Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘EXT2_ECOMPR_FL’ undeclared #10

Open
gagern opened this issue May 31, 2016 · 2 comments
Open

‘EXT2_ECOMPR_FL’ undeclared #10

gagern opened this issue May 31, 2016 · 2 comments

Comments

@gagern
Copy link

gagern commented May 31, 2016

The EXT2_ECOMPR_FL flag used here and here was moved to private API in torvalds/linux@f7699f2. Its more public alias FS_ECOMPR_FL was removed in torvalds/linux@68ce7bf, to be replaced by FS_ENCRYPT_FL using the same code. torvalds/linux@3edc18d 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.

willysr pushed a commit to willysr/slackbuilds that referenced this issue Jun 9, 2016
Changes in ext4 have broken xar, see Gentoo bug 583668 and
mackyle/xar#10 -- there is no fix
for this problem from upstream at this time.

Signed-off-by: David Spencer <[email protected]>
@stobenski
Copy link

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 ) 

@gagern
Copy link
Author

gagern commented Jan 1, 2017

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

typeling1578 added a commit to typeling1578/xar that referenced this issue Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants