summaryrefslogtreecommitdiff
path: root/app-emulation/open-vm-tools/files/10.2.5-libtirpc.patch
blob: a9dfb42b2fc4ae0da8e256b4e6abbce46b095a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 75505fed193fc3779560b57c1b0d6d4209b05bf9 Mon Sep 17 00:00:00 2001
From: Xiami <i@f2light.com>
Date: Thu, 14 Jun 2018 16:23:00 +0800
Subject: [PATCH] lib/dynxdr: for libtirpc

glibc-2.26 do not provide RPC support by default.
This workaround only works for Gentoo as ebuild forces libtirpc.
---
 open-vm-tools/lib/dynxdr/dynxdr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/open-vm-tools/lib/dynxdr/dynxdr.c b/open-vm-tools/lib/dynxdr/dynxdr.c
index 95fdc7e2..d3182733 100644
--- a/open-vm-tools/lib/dynxdr/dynxdr.c
+++ b/open-vm-tools/lib/dynxdr/dynxdr.c
@@ -55,7 +55,7 @@ typedef struct DynXdrData {
  * Mac OS X, FreeBSD and Solaris don't take a const parameter to the
  * "x_getpostn" function.
  */
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun) || defined(_TIRPC_XDR_H)
 #  define DYNXDR_GETPOS_CONST
 #else
 #  define DYNXDR_GETPOS_CONST const
@@ -172,7 +172,7 @@ DynXdrSetPos(XDR *xdrs, // IN
 }
 
 
-#if defined(__GLIBC__) || (defined(sun) && (defined(_LP64) || defined(_KERNEL)))
+#if (defined(__GLIBC__) && !defined(_TIRPC_XDR_H)) || (defined(sun) && (defined(_LP64) || defined(_KERNEL)))
 /*
  *-----------------------------------------------------------------------------
  *
@@ -322,7 +322,7 @@ DynXdr_Create(XDR *in)  // IN
       DynXdrSetPos,     /* x_setpostn */
       DynXdrInline,     /* x_inline */
       NULL,             /* x_destroy */
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) && !defined(_TIRPC_XDR_H)
       NULL,             /* x_getint32 */
       DynXdrPutInt32,   /* x_putint32 */
 #elif defined(__APPLE__)
-- 
2.16.4