mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 23:47:49 +00:00
open-vm-tools: fix issue with deprecated glib functions
This commit is contained in:
parent
1298e0321f
commit
ca327dd709
@ -0,0 +1,90 @@
|
|||||||
|
From 7ec4955072f3f93dd4b5821c9688bc524a089087 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Kurth <okurth@vmware.com>
|
||||||
|
Date: Mon, 30 Sep 2019 16:24:27 -0700
|
||||||
|
Subject: [PATCH] GitHub Issue #367. Remove references to deprecated
|
||||||
|
G_INLINE_FUNC.
|
||||||
|
|
||||||
|
G_INLINE_FUNC was a work-around for compilers that didn't support
|
||||||
|
static inline. Change uses of it to static inline.
|
||||||
|
---
|
||||||
|
lib/include/vmware/tools/plugin.h | 2 +-
|
||||||
|
lib/include/vmware/tools/threadPool.h | 8 ++++----
|
||||||
|
lib/include/vmware/tools/utils.h | 9 ---------
|
||||||
|
3 files changed, 5 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/include/vmware/tools/plugin.h b/lib/include/vmware/tools/plugin.h
|
||||||
|
index f9acc6a..deefd1f 100644
|
||||||
|
--- a/lib/include/vmware/tools/plugin.h
|
||||||
|
+++ b/lib/include/vmware/tools/plugin.h
|
||||||
|
@@ -290,7 +290,7 @@ typedef struct ToolsAppCtx {
|
||||||
|
*
|
||||||
|
* @return TRUE if COM is initialized when the function returns.
|
||||||
|
*/
|
||||||
|
-G_INLINE_FUNC gboolean
|
||||||
|
+static inline gboolean
|
||||||
|
ToolsCore_InitializeCOM(ToolsAppCtx *ctx)
|
||||||
|
{
|
||||||
|
if (!ctx->comInitialized) {
|
||||||
|
diff --git a/lib/include/vmware/tools/threadPool.h b/lib/include/vmware/tools/threadPool.h
|
||||||
|
index 3f2082b..5880fbc 100644
|
||||||
|
--- a/lib/include/vmware/tools/threadPool.h
|
||||||
|
+++ b/lib/include/vmware/tools/threadPool.h
|
||||||
|
@@ -91,7 +91,7 @@ typedef struct ToolsCorePool {
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
-G_INLINE_FUNC ToolsCorePool *
|
||||||
|
+static inline ToolsCorePool *
|
||||||
|
ToolsCorePool_GetPool(ToolsAppCtx *ctx)
|
||||||
|
{
|
||||||
|
ToolsCorePool *pool = NULL;
|
||||||
|
@@ -123,7 +123,7 @@ ToolsCorePool_GetPool(ToolsAppCtx *ctx)
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
-G_INLINE_FUNC guint
|
||||||
|
+static inline guint
|
||||||
|
ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
|
||||||
|
ToolsCorePoolCb cb,
|
||||||
|
gpointer data,
|
||||||
|
@@ -153,7 +153,7 @@ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
-G_INLINE_FUNC void
|
||||||
|
+static inline void
|
||||||
|
ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
|
||||||
|
guint taskId)
|
||||||
|
{
|
||||||
|
@@ -197,7 +197,7 @@ ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
-G_INLINE_FUNC gboolean
|
||||||
|
+static inline gboolean
|
||||||
|
ToolsCorePool_StartThread(ToolsAppCtx *ctx,
|
||||||
|
const gchar *threadName,
|
||||||
|
ToolsCorePoolCb cb,
|
||||||
|
diff --git a/lib/include/vmware/tools/utils.h b/lib/include/vmware/tools/utils.h
|
||||||
|
index f657459..a3292d5 100644
|
||||||
|
--- a/lib/include/vmware/tools/utils.h
|
||||||
|
+++ b/lib/include/vmware/tools/utils.h
|
||||||
|
@@ -51,15 +51,6 @@
|
||||||
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-
|
||||||
|
-/* Work around a glib limitation: it doesn't set G_INLINE_FUNC on Win32. */
|
||||||
|
-#if defined(G_PLATFORM_WIN32)
|
||||||
|
-# if defined(G_INLINE_FUNC)
|
||||||
|
-# undef G_INLINE_FUNC
|
||||||
|
-# endif
|
||||||
|
-# define G_INLINE_FUNC static __inline
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifndef ABS
|
||||||
|
# define ABS(x) (((x) >= 0) ? (x) : -(x))
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user