File 001_kodi_crossguid.patch of Package kodi
diff -uNr kodi-20.0~alpha1.20220327T071632~09e0e17ce8e.orig/xbmc/utils/StringUtils.cpp kodi-20.0~alpha1.20220327T071632~09e0e17ce8e/xbmc/utils/StringUtils.cpp
--- kodi-20.0~alpha1.20220327T071632~09e0e17ce8e.orig/xbmc/utils/StringUtils.cpp 2022-03-27 07:16:32.000000000 +0200
+++ kodi-20.0~alpha1.20220327T071632~09e0e17ce8e/xbmc/utils/StringUtils.cpp 2022-03-27 08:10:15.799987055 +0200
@@ -16,11 +16,7 @@
//
//------------------------------------------------------------------------
-#ifdef HAVE_NEW_CROSSGUID
#include <crossguid/guid.hpp>
-#else
-#include <guid.h>
-#endif
#if defined(TARGET_ANDROID)
#include <androidjni/JNIThreading.h>
@@ -1693,20 +1689,9 @@
std::string StringUtils::CreateUUID()
{
-#ifdef HAVE_NEW_CROSSGUID
-#ifdef TARGET_ANDROID
- JNIEnv* env = xbmc_jnienv();
- return xg::newGuid(env).str();
-#else
- return xg::newGuid().str();
-#endif /* TARGET_ANDROID */
-#else
- static GuidGenerator guidGenerator;
- auto guid = guidGenerator.newGuid();
-
+ auto guid = xg::newGuid();
std::stringstream strGuid; strGuid << guid;
return strGuid.str();
-#endif
}
bool StringUtils::ValidateUUID(const std::string &uuid)