diff --git a/src/PythonQtPythonInclude.h b/src/PythonQtPythonInclude.h index e001b8087..00f0b0788 100644 --- a/src/PythonQtPythonInclude.h +++ b/src/PythonQtPythonInclude.h @@ -59,6 +59,12 @@ #include #endif +// By including Python.h on Linux truncate could have been defined (in unistd.h) +// which would lead to compiler errors. Therefore: +#ifdef truncate +# undef truncate +#endif + // get Qt keywords back #ifdef PYTHONQT_RESTORE_KEYWORDS #define slots Q_SLOTS