From 22ea044bb395a20017368aff9672a45ec26fe3c559818506e9de8f0aa5b9b69a Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 11 Oct 2019 12:44:06 +0000 Subject: [PATCH] Accepting request 737498 from home:iznogood:factory - Add gcc9-static-inline.patch: Fix static inline when building with gcc9. OBS-URL: https://build.opensuse.org/request/show/737498 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=381 --- gcc9-static-inline.patch | 74 ++++++++++++++++++++++++++++++++++++++++ open-vm-tools.changes | 6 ++++ open-vm-tools.spec | 5 ++- 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 gcc9-static-inline.patch diff --git a/gcc9-static-inline.patch b/gcc9-static-inline.patch new file mode 100644 index 0000000..7b3cd8f --- /dev/null +++ b/gcc9-static-inline.patch @@ -0,0 +1,74 @@ +diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h +index f9acc6a29..deefd1f3d 100644 +--- a/open-vm-tools/lib/include/vmware/tools/plugin.h ++++ b/open-vm-tools/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/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h +index 3f2082b3e..5880fbcff 100644 +--- a/open-vm-tools/lib/include/vmware/tools/threadPool.h ++++ b/open-vm-tools/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/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h +index f65745906..a3292d5c0 100644 +--- a/open-vm-tools/lib/include/vmware/tools/utils.h ++++ b/open-vm-tools/lib/include/vmware/tools/utils.h +@@ -51,15 +51,6 @@ + # include + #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 + diff --git a/open-vm-tools.changes b/open-vm-tools.changes index e7b9e5e..a31dbb7 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 11 11:47:05 UTC 2019 - Bjørn Lie + +- Add gcc9-static-inline.patch: Fix static inline when building + with gcc9. + ------------------------------------------------------------------- Wed Oct 9 14:02:35 UTC 2019 - Kirk Allan diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 29cd298..47bb51d 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -162,6 +162,7 @@ Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*) ExclusiveArch: %ix86 x86_64 #Upstream patches Patch0: fix-leaks-Aliases-MappedAliases.patch +Patch1: gcc9-static-inline.patch %systemd_requires @@ -229,6 +230,7 @@ if you intend to create own plugins for vmtoolsd. sed -i -e "s/\r//" README #Upstream patches %patch0 -p2 +%patch1 -p2 %build %if %{with_X} @@ -393,7 +395,8 @@ rm -rf %{buildroot} %files %defattr(-, root, root) -%doc AUTHORS COPYING ChangeLog NEWS README +%license COPYING +%doc AUTHORS ChangeLog NEWS README %{_bindir}/vmtoolsd %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/plugins