From 92521e0ee700ec65d03151746695530f04eb23fe Mon Sep 17 00:00:00 2001 From: Jamie Hewland Date: Sun, 29 Dec 2019 15:55:24 +0200 Subject: [PATCH] 3.6: Include sys/time.h in pytime.h --- .../patches/002-pytime_include_sys_time.patch | 10 ++++++++++ README.md | 1 + 2 files changed, 11 insertions(+) create mode 100644 3.6/alpine3.11/patches/002-pytime_include_sys_time.patch diff --git a/3.6/alpine3.11/patches/002-pytime_include_sys_time.patch b/3.6/alpine3.11/patches/002-pytime_include_sys_time.patch new file mode 100644 index 0000000..6507162 --- /dev/null +++ b/3.6/alpine3.11/patches/002-pytime_include_sys_time.patch @@ -0,0 +1,10 @@ +--- a/pypy/module/cpyext/include/pytime.h ++++ b/pypy/module/cpyext/include/pytime.h +@@ -2,6 +2,7 @@ + #ifndef Py_PYTIME_H + #define Py_PYTIME_H + ++#include + #include "pyconfig.h" /* include for defines */ + #include "object.h" + diff --git a/README.md b/README.md index e278b8b..94fa113 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,4 @@ There are a few workarounds for differences between Alpine Linux and the Debian- ### Issues when building PyPy for Python 3 * RPython expects the `stdin`/`stdout`/`stderr` file handles in `stdio.h` of the standard libc to be of type `FILE*`. With musl these are of type `FILE *const` rather (see [this mailing list thread](https://www.openwall.com/lists/musl/2018/02/02/2)). We patch RPython with the correct type. +* Alpine Linux doesn't include some common time types by default. This seems to be a common problem when compiling code on Alpine: see [here](https://stackoverflow.com/questions/35614923/errors-compiling-mesos-on-alpine-linux) or [here](https://github.com/tesseract-ocr/tesseract/issues/2632). We patch PyPy's "cpyext" module to include `sys/time.h`.