summaryrefslogtreecommitdiffstats
path: root/system/virtualbox/python_3.7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/virtualbox/python_3.7.patch')
-rw-r--r--system/virtualbox/python_3.7.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/virtualbox/python_3.7.patch b/system/virtualbox/python_3.7.patch
new file mode 100644
index 0000000000..2bc9d0ee44
--- /dev/null
+++ b/system/virtualbox/python_3.7.patch
@@ -0,0 +1,13 @@
+diff -Naur VirtualBox-5.2.8.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp VirtualBox-5.2.8/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+--- VirtualBox-5.2.8.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp 2018-02-26 17:05:25.000000000 +0100
++++ VirtualBox-5.2.8/src/libs/xpcom18a4/python/src/ErrorUtils.cpp 2019-04-17 11:45:42.706698000 +0200
+@@ -440,7 +440,8 @@
+ #if PY_MAJOR_VERSION <= 2
+ char *tempResult = PyString_AsString(obResult);
+ #else
+- char *tempResult = PyUnicode_AsUTF8(obResult);
++ /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
++ const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);
+ #endif
+ result = (char *)PyMem_Malloc(strlen(tempResult)+1);
+ if (result==NULL)