diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-01 12:08:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 12:08:37 (GMT) |
commit | 6375287b37c226eb95d032b4714c43f8c04b7edb (patch) | |
tree | 84f0f99063e99117343ed2bb9653ba008db5b5de /Modules/resource.c | |
parent | dbd7d7c8e105e0462aec0530a118c016870c45a8 (diff) | |
download | cpython-6375287b37c226eb95d032b4714c43f8c04b7edb.zip cpython-6375287b37c226eb95d032b4714c43f8c04b7edb.tar.gz cpython-6375287b37c226eb95d032b4714c43f8c04b7edb.tar.bz2 |
[3.12] gh-89886: Rely on HAVE_SYS_TIME_H (GH-105058) (#105192)
Quoting autoconf (v2.71):
All current systems provide time.h; it need not be checked for.
Not all systems provide sys/time.h, but those that do, all allow
you to include it and time.h simultaneously.
(cherry picked from commit 9ab587b7146618866cee52c220aecf7bd5b44b02)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Modules/resource.c')
-rw-r--r-- | Modules/resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/resource.c b/Modules/resource.c index 2a8158c..3c89468c 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -1,7 +1,10 @@ #include "Python.h" #include <sys/resource.h> +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> +#endif +#include <time.h> #include <string.h> #include <errno.h> #include <unistd.h> |