added _XOPEN_SOURCE macro for explicit declaration of pread in crypto lib