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

Doesn't build on OSX #4

Open
contentfree opened this issue Nov 16, 2017 · 2 comments
Open

Doesn't build on OSX #4

contentfree opened this issue Nov 16, 2017 · 2 comments
Labels

Comments

@contentfree
Copy link

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 antagon added the bug label Nov 16, 2017
@antagon
Copy link
Owner

antagon commented Nov 16, 2017

@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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants