victorfisac / Physac

2D physics header-only library for videogames developed in C using raylib library.
http://www.victorfisac.com/physac
MIT License
432 stars 28 forks source link

Enable BSD function definitions and C99 POSIX compliance #22

Closed RDR8 closed 7 years ago

RDR8 commented 7 years ago

This is just hypothetical. I think calls to <sys/time.h> require BSD function definitions. The old way was to define _BSD_SOURCE but it is included in the new way, _DEFAULT_SOURCE which also adds some POSIX stuff for c99.

You might look at raylib/src/external/dr_flac.h:682. where _BSD_SOURCE is defined. They should update, btw. One could do -D_DEFAULT_SOURCE -D_BSD_SOURCE to catch old systems too .My problem was not having either defined in raylib. Here is my reference.

Again, just something to look at. You might want to do it for portability outside of raylib where it has already been merged. Have a great day!

RDR8 commented 7 years ago

Sorry to muddle the issue by stripping whitespace too.

victorfisac commented 7 years ago

Thank you for the addition and fix whitespace.