make everything work on freebsd

This commit is contained in:
josch
2014-12-09 09:07:47 +01:00
parent c8a0f2a942
commit 5bd9e418c4
9 changed files with 97 additions and 5 deletions

View File

@@ -17,8 +17,12 @@
*
*/
#ifdef __linux
#define _POSIX_C_SOURCE 200809L // for strdup and getline
#define _BSD_SOURCE // for strsep
#else
#define _WITH_GETLINE // on freebsd for getline
#endif
#include <stdio.h>
#include <stdlib.h>