]> wimlib.net Git - wimlib/blobdiff - src/wim.c
portability and compression cleanups
[wimlib] / src / wim.c
index 8422d9e10b3d5b9dec5442317106b84f48930a75..51fc1f0452c6ddef1c9f87bf38e3e9f55bde0b35 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -24,6 +24,7 @@
 #endif
 
 #include "wimlib.h"
+#include "wimlib/bitops.h"
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/file_io.h"
@@ -96,7 +97,7 @@ wim_chunk_size_valid(u32 chunk_size, int ctype)
        /* Chunk size must be power of 2.  */
        if (chunk_size == 0)
                return false;
-       order = bsr32(chunk_size);
+       order = fls32(chunk_size);
        if (chunk_size != 1U << order)
                return false;