OSX issues seem to be with "Endian.h" being included in sha512, I managed to point to where it is but I get a bunch of other compilation errors: 
clang: warning: argument unused during compilation: '-fpermissive'
sha512.c:257:17: error: use of undeclared identifier 'be64toh'
        lengthPad[0] = BYTESWAP64(sc->totalLength[0]);
                       ^
sha512.c:103:23: note: expanded from macro 'BYTESWAP64'
#define BYTESWAP64(x) be64toh(x)
                      ^
sha512.c:258:17: error: use of undeclared identifier 'be64toh'
        lengthPad[1] = BYTESWAP64(sc->totalLength[1]);
                       ^
sha512.c:103:23: note: expanded from macro 'BYTESWAP64'
#define BYTESWAP64(x) be64toh(x)
                      ^
sha512.c:265:27: error: use of undeclared identifier 'be64toh'
                        *((uint64_t *) hash) = BYTESWAP64(sc->hash
);
                                               ^
sha512.c:103:23: note: expanded from macro 'BYTESWAP64'
#define BYTESWAP64(x) be64toh(x)
                      ^
3 errors generated.
I'll keep playing, learning heaps at the moment 