fixed some warnings

AuthorKonata <konata@posteo.jp>
Date
Commit0c9637bd3216790fc57ce6bb3d402557967bdc74
Parentf8cc9c9
2 files changed, 7 insertions(+), 3 deletions(-)
Minclude/cutils/misc.h
@@ -2,8 +2,12 @@
22 #define MISC_H
33
44 #ifdef __unix__
5- #define _BSD_SOURCE
6- #define _DEFAULT_SOURCE
5+ #ifndef _BSD_SOURCE
6+ #define _BSD_SOURCE 1
7+ #endif
8+ #ifndef _DEFAULT_SOURCE
9+ #define _DEFAULT_SOURCE 1
10+ #endif
711 #include <unistd.h>
812 #endif
913 #ifdef _WIN32
Msrc/misc.c
@@ -52,7 +52,7 @@ struct timespec timespec_add(const struct timespec* ts_1, const struct timespec*
5252 }
5353
5454 return res;
55-};
55+}
5656
5757
5858 max_uint_t timespec_ms(const struct timespec* ts)