fixing up what my last commit broke, so it compiles on a regular linux again.
platform.h needs some cleanup.