From 279265169031a9952a9385894345d2b6c96bcef9 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 8 Dec 2010 16:19:51 +0000 Subject: [PATCH] [Bugfix] Use malloc/free instead of Xalloc/Xfree when built against X.Org 1.10 and newer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4223 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/xserver/hw/vnc/Input.cc | 4 ++++ unix/xserver/hw/vnc/xvnc.cc | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index 9eb70f81..e23f3d37 100644 --- a/unix/xserver/hw/vnc/Input.cc +++ b/unix/xserver/hw/vnc/Input.cc @@ -63,6 +63,10 @@ extern _X_EXPORT DevPrivateKey CoreDevicePrivateKey; #undef class } +#if XORG >= 110 +#define Xfree free +#endif + using namespace rdr; using namespace rfb; diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index 067ce96b..cc15d79f 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -91,6 +91,11 @@ extern "C" { #undef public } +#if XORG >= 110 +#define Xalloc malloc +#define Xfree free +#endif + #define XVNCVERSION "TigerVNC 1.0.90" #define XVNCCOPYRIGHT ("Copyright (C) 2002-2005 RealVNC Ltd.\n" \ "Copyright (C) 2000-2006 Constantin Kaplinsky\n" \ -- 2.39.5