diff --git a/Include/py_curses.h b/Include/py_curses.h index 3ecf48fcdff..aaff4bd836f 100644 --- a/Include/py_curses.h +++ b/Include/py_curses.h @@ -18,6 +18,17 @@ ** against multiple definition of wchar_t and wint_t. */ #ifdef _XOPEN_SOURCE_EXTENDED +#ifndef __FreeBSD_version +#include +#endif +#if __FreeBSD_version >= 500000 +#ifndef __wchar_t +#define __wchar_t +#endif +#ifndef __wint_t +#define __wint_t +#endif +#else #ifndef _WCHAR_T #define _WCHAR_T #endif @@ -26,6 +37,7 @@ #endif #endif #endif +#endif #ifdef HAVE_NCURSES_H #include