I have a few modifications that fixes a few compile errors in libcod2.cpp
After line 28 add:
PHP Code:
extern char **__environ;
Fixes: '__environ' was not declared in this scope
Replace line 931 with:
PHP Code:
int hook_pthread_self(void)
Fixes: invalid conversion from 'int' to 'pthread_t {aka pthread*}'
On line 1019 you have got this:
PHP Code:
if (stream->_fileno <= 4)
printf("_fileno=%d ", stream->_fileno);
Replace with:
PHP Code:
int _fileno = fileno(stream);
if (_fileno <= 4)
printf("_fileno=%d ", _fileno);
Fixes: 'FILE' has no member named '_fileno'.
Now I can compile all the files on freeBSD, but i have got currently problems with linking the files.