Skip to content

Commit 09176ab

Browse files
committed
Add #include <sys/time.h> to pytime.c for macOS
1 parent 6333f84 commit 09176ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Python/pytime.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#include "Python.h"
22
#include "pycore_time.h" // _PyTime_t
33

4-
#include <time.h> // gettimeofday()
4+
#include <time.h> // gmtime_r() on Windows
5+
#ifdef HAVE_SYS_TIME_H
6+
# include <sys/time.h> // gettimeofday()
7+
#endif
58
#ifdef MS_WINDOWS
69
# include <winsock2.h> // struct timeval
710
#endif

0 commit comments

Comments
 (0)