antagon / TCHunt-ng

Reveal encrypted files stored on a filesystem.
GNU General Public License v3.0
51 stars 8 forks source link

Doesn't build on OSX #4

Open contentfree opened 6 years ago

contentfree commented 6 years ago

After installing libmagic and glib from brew, running make fails:

$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src/
cc -O3 -std=gnu99 -pedantic -Wall -ggdb -c -o test.o test.c
test.c:63:28: error: no member named 'st_atim' in 'struct stat'
                timebuff.actime = fstat->st_atim.tv_sec;
                                  ~~~~~  ^
test.c:64:29: error: no member named 'st_mtim' in 'struct stat'
                timebuff.modtime = fstat->st_mtim.tv_sec;
                                   ~~~~~  ^
2 errors generated.
make[1]: *** [test.o] Error 1
make: *** [all] Error 2

Likely due to a POSIX incompatibility. Maybe a similar patch as mentioned at https://sourceforge.net/p/optipng/bugs/47/ would work?

antagon commented 6 years ago

@contentfree I am unable to test for OSX, however I have pushed a new branch https://github.com/antagon/TCHunt-ng/tree/1.4 with minor changes to the source code that reflect on structure of struct stat as described here: https://opensource.apple.com/source/xnu/xnu-4570.1.46/bsd/sys/stat.h.auto.html.

It would be of great help if you could compile the new version found in a branch 1.4 and report back.

contentfree commented 6 years ago

@antagon: The 1.4 branch compiles and appears to work. Thanks!