diff --git a/recipes-support/opencv/opencv/fixmissingconst.patch b/recipes-support/opencv/opencv/fixmissingconst.patch new file mode 100644 index 0000000..0df3f24 --- /dev/null +++ b/recipes-support/opencv/opencv/fixmissingconst.patch @@ -0,0 +1,15 @@ +diff --git modules/python/src2/cv2.cpp modules/python/src2/cv2.cpp +index e69e933375..11adc342cb 100644 +--- a/modules/python/src2/cv2.cpp ++++ b/modules/python/src2/cv2.cpp +@@ -727,7 +727,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name) + (void)name; + if(!obj || obj == Py_None) + return true; +- char* str = PyString_AsString(obj); ++ const char* str = PyString_AsString(obj); + if(!str) + return false; + value = String(str); + + diff --git a/recipes-support/opencv/opencv_3.2.bb b/recipes-support/opencv/opencv_3.2.bb index cbc756b..ad84fe6 100644 --- a/recipes-support/opencv/opencv_3.2.bb +++ b/recipes-support/opencv/opencv_3.2.bb @@ -32,6 +32,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ file://0001-Make-opencv-ts-create-share-library-intead-of-static.patch \ file://0001-To-fix-errors-as-following.patch \ file://0001-tracking-make-opencv_dnn-dependancy-optional.patch;patchdir=../contrib/ \ + file://fixmissingconst.patch \ " PV = "3.2+git${SRCPV}"