summary refs log tree commit diff
path: root/pkgs/development/libraries/libvirt/build-on-bsd.patch
blob: 830f0f30ff9b81cb5053ad233d037f89065819e3 (plain) (blame)
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
diff -Naur libvirt-1.3.0.orig/src/admin/admin_protocol.c libvirt-1.3.0/src/admin/admin_protocol.c
--- libvirt-1.3.0.orig/src/admin/admin_protocol.c	2015-12-02 16:17:07.000000000 +0100
+++ libvirt-1.3.0/src/admin/admin_protocol.c	2016-01-04 17:57:10.043412857 +0100
@@ -6,6 +6,25 @@
 
 #include "admin_protocol.h"
 
+/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t
+ * and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
+ */
+#ifdef HAVE_XDR_U_INT64_T
+# define xdr_uint64_t xdr_u_int64_t
+#endif
+#ifndef IXDR_PUT_INT32
+# define IXDR_PUT_INT32 IXDR_PUT_LONG
+#endif
+#ifndef IXDR_GET_INT32
+# define IXDR_GET_INT32 IXDR_GET_LONG
+#endif
+#ifndef IXDR_PUT_U_INT32
+# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
+#endif
+#ifndef IXDR_GET_U_INT32
+# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
+#endif
+
 bool_t
 xdr_admin_nonnull_string (XDR *xdrs, admin_nonnull_string *objp)
 {
diff -Naur libvirt-1.3.0.orig/src/logging/log_protocol.c libvirt-1.3.0/src/logging/log_protocol.c
--- libvirt-1.3.0.orig/src/logging/log_protocol.c	2015-12-08 13:07:35.000000000 +0100
+++ libvirt-1.3.0/src/logging/log_protocol.c	2016-01-04 17:56:50.673463563 +0100
@@ -7,6 +7,25 @@
 #include "log_protocol.h"
 #include "internal.h"
 
+/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t
+ * and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
+ */
+#ifdef HAVE_XDR_U_INT64_T
+# define xdr_uint64_t xdr_u_int64_t
+#endif
+#ifndef IXDR_PUT_INT32
+# define IXDR_PUT_INT32 IXDR_PUT_LONG
+#endif
+#ifndef IXDR_GET_INT32
+# define IXDR_GET_INT32 IXDR_GET_LONG
+#endif
+#ifndef IXDR_PUT_U_INT32
+# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
+#endif
+#ifndef IXDR_GET_U_INT32
+# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
+#endif
+
 bool_t
 xdr_virLogManagerProtocolUUID (XDR *xdrs, virLogManagerProtocolUUID objp)
 {