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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
From 89f0563609ac5f30e515a8b93aa2ccc5e98abadb Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:54:42 +0000
Subject: [PATCH 10/14] Add support for building with system libtirpc
This is needed for buliding with musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
open-vm-tools/configure.ac | 14 ++++++++++++++
open-vm-tools/lib/dynxdr/Makefile.am | 8 +++++++-
open-vm-tools/lib/guestRpc/Makefile.am | 6 ++++++
open-vm-tools/lib/netUtil/Makefile.am | 4 ++++
open-vm-tools/lib/nicInfo/Makefile.am | 2 ++
open-vm-tools/lib/rpcChannel/Makefile.am | 4 ++++
open-vm-tools/lib/slashProc/Makefile.am | 4 ++++
open-vm-tools/libguestlib/Makefile.am | 2 ++
open-vm-tools/rpctool/Makefile.am | 3 +++
open-vm-tools/rpctool/rpctool.c | 2 ++
open-vm-tools/services/plugins/dndcp/Makefile.am | 2 ++
open-vm-tools/services/plugins/guestInfo/Makefile.am | 1 +
open-vm-tools/services/plugins/resolutionSet/Makefile.am | 2 ++
open-vm-tools/services/plugins/vix/Makefile.am | 2 ++
open-vm-tools/services/plugins/vmbackup/Makefile.am | 2 ++
open-vm-tools/toolbox/Makefile.am | 2 ++
16 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
index b9f89115..a6312aa4 100644
--- a/open-vm-tools/configure.ac
+++ b/open-vm-tools/configure.ac
@@ -405,6 +405,20 @@ AC_VMW_CHECK_LIB([fuse],
AC_MSG_WARN([Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled.])])
#
+# Check for libtirpc
+#
+AC_VMW_CHECK_LIB([libtirpc],
+ [LIBTIRPC],
+ [libtirpc],
+ [],
+ [],
+ [rpc/xdr.h],
+ [xdr_void],
+ [have_libtirpc=yes],
+ [have_libtitirpc=no;
+ AC_MSG_WARN([libtirpc is missing.])])
+
+#
# Check for PAM.
#
AC_ARG_WITH([pam],
diff --git a/open-vm-tools/lib/dynxdr/Makefile.am b/open-vm-tools/lib/dynxdr/Makefile.am
index 841c17db..5212f693 100644
--- a/open-vm-tools/lib/dynxdr/Makefile.am
+++ b/open-vm-tools/lib/dynxdr/Makefile.am
@@ -17,7 +17,13 @@
noinst_LTLIBRARIES = libDynxdr.la
-libDynxdr_la_SOURCES =
+libDynxdr_la_SOURCES =
libDynxdr_la_SOURCES += dynxdr.c
libDynxdr_la_SOURCES += xdrutil.c
+libDynxdr_la_CPPFLAGS =
+libDynxdr_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+libDynxdr_la_LIBADD =
+libDynxdr_la_LIBADD += @LIBTIRPC_LIBS@
+
diff --git a/open-vm-tools/lib/guestRpc/Makefile.am b/open-vm-tools/lib/guestRpc/Makefile.am
index 1605a27c..e37ecc7a 100644
--- a/open-vm-tools/lib/guestRpc/Makefile.am
+++ b/open-vm-tools/lib/guestRpc/Makefile.am
@@ -20,6 +20,12 @@ noinst_LTLIBRARIES = libGuestRpc.la
libGuestRpc_la_SOURCES =
libGuestRpc_la_SOURCES += nicinfo_xdr.c
+libGuestRpc_la_CPPFLAGS =
+libGuestRpc_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+libGuestRpc_la_LIBADD =
+libGuestRpc_la_LIBADD += @LIBTIRPC_LIBS@
+
# XXX: Autoreconf complains about this and recommends using AM_CFLAGS instead.
# Problem is, $(CFLAGS) is appended to the compiler command line after AM_CFLAGS
# and after libGuestRpc_la_CFLAGS, so "-Wall -Werror" will override this flag.
diff --git a/open-vm-tools/lib/netUtil/Makefile.am b/open-vm-tools/lib/netUtil/Makefile.am
index eddc4ae0..fccc824f 100644
--- a/open-vm-tools/lib/netUtil/Makefile.am
+++ b/open-vm-tools/lib/netUtil/Makefile.am
@@ -20,3 +20,7 @@ noinst_LTLIBRARIES = libNetUtil.la
libNetUtil_la_SOURCES =
libNetUtil_la_SOURCES += netUtilLinux.c
+libNetUtil_la_CPPFLAGS =
+libNetUtil_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+libNetUtil_la_LIBADD = @LIBTIRPC_LIBS@
diff --git a/open-vm-tools/lib/nicInfo/Makefile.am b/open-vm-tools/lib/nicInfo/Makefile.am
index de09172b..ddc44dda 100644
--- a/open-vm-tools/lib/nicInfo/Makefile.am
+++ b/open-vm-tools/lib/nicInfo/Makefile.am
@@ -25,12 +25,14 @@ libNicInfo_la_SOURCES += nicInfoPosix.c
libNicInfo_la_CPPFLAGS =
libNicInfo_la_CPPFLAGS += @GLIB2_CPPFLAGS@
+libNicInfo_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
AM_CFLAGS = $(DNET_CPPFLAGS)
if USE_SLASH_PROC
AM_CFLAGS += -DUSE_SLASH_PROC
endif
libNicInfo_la_LIBADD =
+libNicInfo_la_LIBADD += @LIBTIRPC_LIBS@
if HAVE_DNET
libNicInfo_la_LIBADD += @DNET_LIBS@
endif
diff --git a/open-vm-tools/lib/rpcChannel/Makefile.am b/open-vm-tools/lib/rpcChannel/Makefile.am
index 4577b655..457f1938 100644
--- a/open-vm-tools/lib/rpcChannel/Makefile.am
+++ b/open-vm-tools/lib/rpcChannel/Makefile.am
@@ -27,3 +27,7 @@ endif
libRpcChannel_la_CPPFLAGS =
libRpcChannel_la_CPPFLAGS += @VMTOOLS_CPPFLAGS@
+libRpcChannel_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+libRpcChannel_la_LIBADD =
+libRpcChannel_la_LIBADD += @LIBTIRPC_LIBS@
diff --git a/open-vm-tools/lib/slashProc/Makefile.am b/open-vm-tools/lib/slashProc/Makefile.am
index b3afe9e5..8220f5f8 100644
--- a/open-vm-tools/lib/slashProc/Makefile.am
+++ b/open-vm-tools/lib/slashProc/Makefile.am
@@ -22,6 +22,10 @@ libSlashProc_la_SOURCES += net.c
libSlashProc_la_CPPFLAGS =
libSlashProc_la_CPPFLAGS += @GLIB2_CPPFLAGS@
+libSlashProc_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+libSlashProc_la_LIBADD =
+libSlashProc_la_LIBADD += @LIBTIRPC_LIBS@
AM_CFLAGS = $(DNET_CPPFLAGS)
diff --git a/open-vm-tools/libguestlib/Makefile.am b/open-vm-tools/libguestlib/Makefile.am
index b49af696..393f5c13 100644
--- a/open-vm-tools/libguestlib/Makefile.am
+++ b/open-vm-tools/libguestlib/Makefile.am
@@ -22,6 +22,7 @@ AM_CFLAGS += -I$(top_srcdir)/include
libguestlib_la_LIBADD =
libguestlib_la_LIBADD += @VMTOOLS_LIBS@
+libguestlib_la_LIBADD += @LIBTIRPC_LIBS@
libguestlib_la_SOURCES =
libguestlib_la_SOURCES += guestlibV3_xdr.c
@@ -56,6 +57,7 @@ CFLAGS += -Wno-unused
libguestlib_la_CPPFLAGS =
libguestlib_la_CPPFLAGS += -DVMTOOLS_USE_GLIB
libguestlib_la_CPPFLAGS += @GLIB2_CPPFLAGS@
+libguestlib_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
EXTRA_DIST = vmguestlib.pc.in
diff --git a/open-vm-tools/rpctool/Makefile.am b/open-vm-tools/rpctool/Makefile.am
index cb05cf8a..03d65285 100644
--- a/open-vm-tools/rpctool/Makefile.am
+++ b/open-vm-tools/rpctool/Makefile.am
@@ -17,10 +17,13 @@
bin_PROGRAMS = vmware-rpctool
+vmware_rpctool_CFLAGS= @LIBTIRPC_LIBS@
+
vmware_rpctool_SOURCES =
vmware_rpctool_SOURCES += rpctool.c
vmware_rpctool_LDADD =
+vmware_rpctool_LDADD += @LIBTIRPC_LIBS@
vmware_rpctool_LDADD += ../lib/rpcOut/libRpcOut.la
vmware_rpctool_LDADD += ../lib/message/libMessage.la
vmware_rpctool_LDADD += ../lib/backdoor/libBackdoor.la
diff --git a/open-vm-tools/rpctool/rpctool.c b/open-vm-tools/rpctool/rpctool.c
index f1528948..448d3328 100644
--- a/open-vm-tools/rpctool/rpctool.c
+++ b/open-vm-tools/rpctool/rpctool.c
@@ -23,6 +23,8 @@
*/
#ifndef _WIN32
+#define _GNU_SOURCE
+#include <signal.h>
#include "sigPosixRegs.h"
#include <errno.h>
#include <stdint.h>
diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.am b/open-vm-tools/services/plugins/dndcp/Makefile.am
index d1543054..21209c8c 100644
--- a/open-vm-tools/services/plugins/dndcp/Makefile.am
+++ b/open-vm-tools/services/plugins/dndcp/Makefile.am
@@ -23,6 +23,7 @@ plugin_LTLIBRARIES = libdndcp.la
libdndcp_la_CPPFLAGS =
libdndcp_la_CPPFLAGS += @GTK_CPPFLAGS@
libdndcp_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
+libdndcp_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dnd
libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dndGuest
libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/stringxx
@@ -44,6 +45,7 @@ libdndcp_la_LIBADD += @GTK_LIBS@
libdndcp_la_LIBADD += @GTKMM_LIBS@
libdndcp_la_LIBADD += @VMTOOLS_LIBS@
libdndcp_la_LIBADD += @HGFS_LIBS@
+libdndcp_la_LIBADD += @LIBTIRPC_LIBS@
libdndcp_la_LIBADD += $(top_builddir)/lib/hgfsUri/hgfsUriPosix.lo
libdndcp_la_SOURCES =
diff --git a/open-vm-tools/services/plugins/guestInfo/Makefile.am b/open-vm-tools/services/plugins/guestInfo/Makefile.am
index 4400e5a1..419bab08 100644
--- a/open-vm-tools/services/plugins/guestInfo/Makefile.am
+++ b/open-vm-tools/services/plugins/guestInfo/Makefile.am
@@ -22,6 +22,7 @@ plugin_LTLIBRARIES = libguestInfo.la
libguestInfo_la_CPPFLAGS =
libguestInfo_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
+libguestInfo_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
libguestInfo_la_LDFLAGS =
libguestInfo_la_LDFLAGS += @PLUGIN_LDFLAGS@
diff --git a/open-vm-tools/services/plugins/resolutionSet/Makefile.am b/open-vm-tools/services/plugins/resolutionSet/Makefile.am
index 3d8dbc4f..1d057c63 100644
--- a/open-vm-tools/services/plugins/resolutionSet/Makefile.am
+++ b/open-vm-tools/services/plugins/resolutionSet/Makefile.am
@@ -21,6 +21,7 @@ plugin_LTLIBRARIES = libresolutionSet.la
libresolutionSet_la_CPPFLAGS =
libresolutionSet_la_CPPFLAGS += @GTK_CPPFLAGS@
libresolutionSet_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
+libresolutionSet_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
libresolutionSet_la_CPPFLAGS += -DRESOLUTION_X11
libresolutionSet_la_LDFLAGS =
@@ -30,6 +31,7 @@ libresolutionSet_la_LIBADD =
libresolutionSet_la_LIBADD += @COMMON_XLIBS@
libresolutionSet_la_LIBADD += @GTK_LIBS@
libresolutionSet_la_LIBADD += @VMTOOLS_LIBS@
+libresolutionSet_la_LIBADD += @LIBTIRPC_LIBS@
libresolutionSet_la_SOURCES =
libresolutionSet_la_SOURCES += libvmwarectrl.c
diff --git a/open-vm-tools/services/plugins/vix/Makefile.am b/open-vm-tools/services/plugins/vix/Makefile.am
index f7d541e5..af4e0a55 100644
--- a/open-vm-tools/services/plugins/vix/Makefile.am
+++ b/open-vm-tools/services/plugins/vix/Makefile.am
@@ -20,6 +20,7 @@ plugin_LTLIBRARIES = libvix.la
libvix_la_CPPFLAGS =
libvix_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
+libvix_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
libvix_la_CPPFLAGS += -I$(top_srcdir)/vgauth/public
libvix_la_LDFLAGS =
@@ -29,6 +30,7 @@ libvix_la_LIBADD =
libvix_la_LIBADD += @VIX_LIBADD@
libvix_la_LIBADD += @VMTOOLS_LIBS@
libvix_la_LIBADD += @HGFS_LIBS@
+libvix_la_LIBADD += @LIBTIRPC_LIBS@
libvix_la_LIBADD += $(top_builddir)/lib/auth/libAuth.la
libvix_la_LIBADD += $(top_builddir)/lib/foundryMsg/libFoundryMsg.la
libvix_la_LIBADD += $(top_builddir)/lib/impersonate/libImpersonate.la
diff --git a/open-vm-tools/services/plugins/vmbackup/Makefile.am b/open-vm-tools/services/plugins/vmbackup/Makefile.am
index 81fc5c7f..00224f65 100644
--- a/open-vm-tools/services/plugins/vmbackup/Makefile.am
+++ b/open-vm-tools/services/plugins/vmbackup/Makefile.am
@@ -20,6 +20,7 @@ plugin_LTLIBRARIES = libvmbackup.la
libvmbackup_la_CPPFLAGS =
libvmbackup_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
+libvmbackup_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
libvmbackup_la_LDFLAGS =
libvmbackup_la_LDFLAGS += @PLUGIN_LDFLAGS@
@@ -27,6 +28,7 @@ libvmbackup_la_LDFLAGS += @PLUGIN_LDFLAGS@
libvmbackup_la_LIBADD =
libvmbackup_la_LIBADD += @GOBJECT_LIBS@
libvmbackup_la_LIBADD += @VMTOOLS_LIBS@
+libvmbackup_la_LIBADD += @LIBTIRPC_LIBS@
libvmbackup_la_SOURCES =
libvmbackup_la_SOURCES += nullProvider.c
diff --git a/open-vm-tools/toolbox/Makefile.am b/open-vm-tools/toolbox/Makefile.am
index 66d36ac6..2becd3c7 100644
--- a/open-vm-tools/toolbox/Makefile.am
+++ b/open-vm-tools/toolbox/Makefile.am
@@ -20,9 +20,11 @@ bin_PROGRAMS = vmware-toolbox-cmd
vmware_toolbox_cmd_LDADD =
vmware_toolbox_cmd_LDADD += ../libguestlib/libguestlib.la
vmware_toolbox_cmd_LDADD += @VMTOOLS_LIBS@
+vmware_toolbox_cmd_LDADD += @LIBTIRPC_LIBS@
vmware_toolbox_cmd_CPPFLAGS =
vmware_toolbox_cmd_CPPFLAGS += @VMTOOLS_CPPFLAGS@
+vmware_toolbox_cmd_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
vmware_toolbox_cmd_SOURCES =
vmware_toolbox_cmd_SOURCES += toolbox-cmd.c
--
2.11.0
|