Compare commits

...

2 Commits

Author SHA1 Message Date
Jaeden Amero
f76c06669a
Merge 5db9c0d508 into 7041b52ebc 2024-11-08 23:48:49 +01:00
Jaeden Amero
5db9c0d508 Fix build for clang
Remove declaring _POSIX_SOURCE manually. Let the compiler take care of
this on its own, except on Windows where the compiler doesn't take care
of this. Additionally, include a missing header file for the definition
of struct sockaddr_in, which we need before we can allocate the struct.
With these fixes, we can build with Clang 18.1.5, although there are
many warnings.
2024-07-12 17:57:07 +00:00
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <poll.h>
#include <signal.h>

View File

@ -3,8 +3,13 @@
/* (C)ChaN, 2018 */
/*------------------------------------------------------------------------*/
#ifdef _WIN32
/* Windows will not define localtime_r for us unless we explicitly request it
* with macros. */
#define _POSIX_SOURCE
#define _POSIX_THREAD_SAFE_FUNCTIONS
#endif
#include <time.h>
#include "ff.h"