Skip to content

Commit 3f343bc

Browse files
committed
utils: Add an error if platform detection failed
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
1 parent d295048 commit 3f343bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utils.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ int add_iso8601_utc_datetime(char* buf, size_t size)
131131
return r;
132132
}
133133

134-
#else /* WINDOWS */
134+
#elif defined(__linux__) || defined(__APPLE__)
135135

136136
#include <sys/time.h>
137137
#include <time.h>
@@ -148,7 +148,11 @@ int add_iso8601_utc_datetime(char *buf, size_t size)
148148
return strftime(buf, size, "%Y-%m-%dT%H:%M:%SZ", &timeinfo);
149149
}
150150

151-
#endif /* WINDOWS */
151+
#else
152+
153+
#error Platform test failed
154+
155+
#endif
152156

153157
int64_t usec_now()
154158
{

0 commit comments

Comments
 (0)