Great.  To solve the posix problem, you can do the same as you've done here to include the posix .o file.