Skip to content

Commit

Permalink
3.6: Include sys/time.h in pytime.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JayH5 committed Dec 29, 2019
1 parent 7ecdc0d commit 92521e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 3.6/alpine3.11/patches/002-pytime_include_sys_time.patch
Original file line number Diff line number Diff line change
@@ -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 <sys/time.h>
#include "pyconfig.h" /* include for defines */
#include "object.h"

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit 92521e0

Please sign in to comment.