summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/xdr-generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/xdr/src/xdr-generic.h')
-rw-r--r--rpc/xdr/src/xdr-generic.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/rpc/xdr/src/xdr-generic.h b/rpc/xdr/src/xdr-generic.h
index 2547d7e545d..2f12290ef02 100644
--- a/rpc/xdr/src/xdr-generic.h
+++ b/rpc/xdr/src/xdr-generic.h
@@ -24,6 +24,34 @@
#define XDR_BYTES_PER_UNIT 4
+/*
+ On OSX > 10.9
+ -------------
+ typedef bool_t (*xdrproc_t)(XDR *, void *, unsigned int);
+
+ On OSX < 10.9
+ ------------
+ typedef bool_t (*xdrproc_t)(XDR *, ...);
+
+ FreeBSD all versions
+ ------------
+ typedef bool_t (*xdrproc_t)(XDR *, ...);
+
+ NetBSD 6.1.4
+ -----------
+ typedef bool_t (*xdrproc_t)(XDR *, const void *);
+
+ Linux all versions
+ -----------
+ typedef bool_t (*xdrproc_t)(XDR *, void *,...);
+*/
+
+#if defined(__NetBSD__)
+#define PROC(xdr, res) proc(xdr, res)
+#else
+#define PROC(xdr, res) proc(xdr, res, 0)
+#endif
+
ssize_t
xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc);