From 8a72e48acdc0eac8dc7a9b13b10c03a3e4cc5527 Mon Sep 17 00:00:00 2001 From: Ravindra Kumar Date: Tue, 4 Feb 2020 10:53:01 -0800 Subject: [PATCH] Added gcc10-warning.patch for fixing compilation issues. --- gcc10-warning.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ open-vm-tools.spec | 8 ++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 gcc10-warning.patch diff --git a/gcc10-warning.patch b/gcc10-warning.patch new file mode 100644 index 0000000..1a4a653 --- /dev/null +++ b/gcc10-warning.patch @@ -0,0 +1,42 @@ +--- a/open-vm-tools/lib/user/utilBacktrace.c 2020-02-03 12:13:08.092463938 -0800 ++++ b/open-vm-tools/lib/user/utilBacktrace.c 2020-02-03 15:30:56.234489288 -0800 +@@ -510,13 +510,16 @@ + options.bugNumber = bugNr; + CoreDump_LogFullBacktraceToFunc(&options, outFunc, outFuncData); + #else +- uintptr_t *x = (uintptr_t *) &bugNr; ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Warray-bounds" ++ uintptr_t *x = ((uintptr_t *) &bugNr) - 2; ++#pragma GCC diagnostic pop + + if (bugNr == 0) { + outFunc(outFuncData, "Backtrace:\n"); + } else { + outFunc(outFuncData, "Backtrace for bugNr=%d\n",bugNr); + } +- Util_BacktraceFromPointerWithFunc(&x[-2], outFunc, outFuncData); ++ Util_BacktraceFromPointerWithFunc(x, outFunc, outFuncData); + #endif + } +--- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp 2020-02-03 12:13:09.572471067 -0800 ++++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp 2020-02-03 14:03:12.518469494 -0800 +@@ -94,15 +94,15 @@ + * This is for V1 text copy paste only! + */ + #ifndef GDK_SELECTION_CLIPBOARD +-GdkAtom GDK_SELECTION_CLIPBOARD; ++extern GdkAtom GDK_SELECTION_CLIPBOARD; + #endif + + #ifndef GDK_SELECTION_TYPE_TIMESTAMP +-GdkAtom GDK_SELECTION_TYPE_TIMESTAMP; ++extern GdkAtom GDK_SELECTION_TYPE_TIMESTAMP; + #endif + + #ifndef GDK_SELECTION_TYPE_UTF8_STRING +-GdkAtom GDK_SELECTION_TYPE_UTF8_STRING; ++extern GdkAtom GDK_SELECTION_TYPE_UTF8_STRING; + #endif + + diff --git a/open-vm-tools.spec b/open-vm-tools.spec index af55367..076c54a 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -1,5 +1,5 @@ ################################################################################ -### Copyright 2013-19 VMware, Inc. All rights reserved. +### Copyright 2013-2020 VMware, Inc. All rights reserved. ### ### RPM SPEC file for building open-vm-tools packages. ### @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 5%{?dist} +Release: 6%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware License: GPLv2 URL: https://github.com/vmware/%{name} @@ -49,6 +49,7 @@ ExclusiveArch: %{ix86} x86_64 Patch1: gcc9-static-inline.patch # Reference https://github.com/vmware/open-vm-tools/commit/9bc72f0b09702754b429115658a85223cb3058bd Patch2: vix-memleak.patch +Patch3: gcc10-warning.patch BuildRequires: autoconf BuildRequires: automake @@ -343,6 +344,9 @@ fi %{_bindir}/vmware-vgauth-smoketest %changelog +* Tue Feb 04 2020 Ravindra Kumar - 11.0.0-6 +- Added gcc10-warning.patch for fixing compilation issues. + * Wed Jan 29 2020 Fedora Release Engineering - 11.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild