[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 9ab587b714)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Miss Islington (bot) 2023-06-01 05:08:37 -07:00 committed by GitHub
parent dbd7d7c8e1
commit 6375287b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 19 deletions

View file

@ -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>