Skip to content

Commit

Permalink
Add #include <time.h> where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 1, 2023
1 parent 26cf3e5 commit 6333f84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/timemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "pycore_runtime.h" // _Py_ID()

#include <ctype.h>

#include <time.h> // clock()
#ifdef HAVE_SYS_TIMES_H
# include <sys/times.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions Modules/xxsubtype.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Python.h"

#include <stddef.h> // offsetof()
#include <time.h> // clock()


PyDoc_STRVAR(xxsubtype__doc__,
Expand Down
2 changes: 2 additions & 0 deletions Python/pytime.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Python.h"
#include "pycore_time.h" // _PyTime_t

#include <time.h> // gettimeofday()
#ifdef MS_WINDOWS
# include <winsock2.h> // struct timeval
#endif
Expand Down

0 comments on commit 6333f84

Please sign in to comment.