Patch by Vadim A. Misbakh-Soloviov (mva) https://bugs.gentoo.org/show_bug.cgi?id=564454 --- lib_pypy/_curses.py.old 2016-01-18 19:13:00.241886442 +0000 +++ lib_pypy/_curses.py 2016-01-18 19:26:01.061885605 +0000 @@ -1,6 +1,7 @@ """Reimplementation of the standard extension module '_curses' using cffi.""" import sys +import platform if sys.platform == 'win32': #This module does not exist in windows raise ImportError('No module named _curses') @@ -10,12 +11,18 @@ ffi = FFI() +# Monkeypatch to make it build against ncurses-6. +# Inspired by https://goo.gl/xvjQcd +_type = "uint32_t" +if platform.machine() == "x86_64": + _type = "unsigned" + ffi.cdef(""" typedef ... WINDOW; typedef ... SCREEN; -typedef unsigned long mmask_t; +typedef """+_type+""" mmask_t; typedef unsigned char bool; -typedef unsigned long chtype; +typedef """+_type+""" chtype; typedef chtype attr_t; typedef struct