Open mzpqnxow opened 2 years ago
Hello @devttys0 would you like to merge this or should I close it out? It's been discussed elsewhere in this repository (#36) and in binwalk (https://github.com/ReFirmLabs/binwalk/issues/588) and a few people have pasted fixes into the issues, but there hasn't been a PR or fix committed
Thanks!
This is a tiny patch that fixes #36 with a code change
I understand that it's possible to use
CFLAGS
to make newer versions ofgcc
accept the code "as-is" but in my opinion it's better to address it this way by moving the declaration ofverbose
into a single.c
and accessing it as anextern
elsewhere.Because
verbose
is only accessed directly inunsquash.c
(by the command-line flag parsing code) I put it there, it seemed the most logicalFor whatever reason I wasn't able to create a clean patch to your patch, so rather than replace the entire
patch0.txt
with the changes, I added apatch1.txt
. I assume you'll want to coalesce these into one if you decide to accept thisI didn't do extensive testing on the change but it builds and functions as expected both with and without the
-trace
flag. I tested by building (obviously), extracting a few squashfs filesystems I had laying around and making sure the trace output showed up and there weren't any runtime symbol resolution errorsThanks for all your work on binwalk and embedded RE in general!