open-vm-tools/enable-gcc46+.patch

61 lines
2.5 KiB
Diff
Raw Normal View History

When compiling under gcc4.6+, the following errors can be seen:
[ 93s] In file included from /usr/include/sigc++-2.0/sigc++/signal.h:8:0,
[ 93s] from /usr/include/sigc++-2.0/sigc++/connection.h:22,
[ 93s] from ../../../services/plugins/dndcp/dnd/copyPasteRpc.hh:28,
[ 93s] from dndGuest/copyPasteRpcV3.hh:29,
[ 93s] from dndGuest/copyPasteRpcV3.cc:26:
[ 93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:46:11: error: 'size_t' does not name a type
[ 93s] typedef size_t size_type;
[ 93s] ^
[ 93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:95:3: error: 'size_type' does not name a type
[ 93s] size_type size() const;
[ 93s] ^
[ 93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:239:11: error: 'size_t' does not name a type
[ 93s] typedef size_t size_type;
[ 93s] ^
[ 93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:261:3: error: 'size_type' does not name a type
[ 93s] size_type size() const;
As per https://gcc.gnu.org/gcc-4.6/porting_to.html, this is fixed through:
#include <cstddef>
Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/copyPasteRpc.hh
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/copyPasteRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/copyPasteRpc.hh
@@ -25,6 +25,7 @@
#ifndef COPY_PASTE_RPC_HH
#define COPY_PASTE_RPC_HH
+#include <cstddef>
#include <sigc++/connection.h>
#include "dndCPLibExport.hh"
#include "rpcBase.h"
Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/dndRpc.hh
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/dndRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/dndRpc.hh
@@ -25,6 +25,7 @@
#ifndef DND_RPC_HH
#define DND_RPC_HH
+#include <cstddef>
#include <sigc++/connection.h>
#include "dndCPLibExport.hh"
#include "rpcBase.h"
Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/fileTransferRpc.hh
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/fileTransferRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/fileTransferRpc.hh
@@ -25,6 +25,7 @@
#ifndef FILE_TRANSFER_RPC_HH
#define FILE_TRANSFER_RPC_HH
+#include <cstddef>
#include <sigc++/connection.h>
#include "dndCPLibExport.hh"
#include "rpcBase.h"