From 78b646b66602f383ae72ffe832e3e73b712ff345 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 18 Sep 2021 17:20:51 +0300 Subject: [PATCH] kioslave: define PORTMAP before including rpc header in all files fixes build on OpenIndiana Signed-off-by: Ivailo Monev --- kioslave/nfs/nfsv2.cpp | 1 + kioslave/nfs/nfsv2.h | 6 +++++- kioslave/nfs/nfsv3.cpp | 1 + kioslave/nfs/nfsv3.h | 6 +++++- kioslave/nfs/rpc_nfs2_prot.h | 5 +++++ kioslave/nfs/rpc_nfs3_prot.h | 5 +++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/kioslave/nfs/nfsv2.cpp b/kioslave/nfs/nfsv2.cpp index 675ab5e9..24eec089 100644 --- a/kioslave/nfs/nfsv2.cpp +++ b/kioslave/nfs/nfsv2.cpp @@ -27,6 +27,7 @@ #ifndef PORTMAP #define PORTMAP #endif + #include // for rpc calls #include diff --git a/kioslave/nfs/nfsv2.h b/kioslave/nfs/nfsv2.h index 0e724623..f0bca71e 100644 --- a/kioslave/nfs/nfsv2.h +++ b/kioslave/nfs/nfsv2.h @@ -23,7 +23,11 @@ #include "kio_nfs.h" -#define PORTMAP //this seems to be required to compile on Solaris +// This is needed on Solaris so that rpc.h defines clnttcp_create etc. +#ifndef PORTMAP +#define PORTMAP +#endif + #include #include #include diff --git a/kioslave/nfs/nfsv3.cpp b/kioslave/nfs/nfsv3.cpp index 43ce2ab1..9aa8e702 100644 --- a/kioslave/nfs/nfsv3.cpp +++ b/kioslave/nfs/nfsv3.cpp @@ -27,6 +27,7 @@ #ifndef PORTMAP #define PORTMAP #endif + #include // for rpc calls #include diff --git a/kioslave/nfs/nfsv3.h b/kioslave/nfs/nfsv3.h index 5bdc8865..7c7d10fb 100644 --- a/kioslave/nfs/nfsv3.h +++ b/kioslave/nfs/nfsv3.h @@ -23,7 +23,11 @@ #include "kio_nfs.h" -#define PORTMAP //this seems to be required to compile on Solaris +// This is needed on Solaris so that rpc.h defines clnttcp_create etc. +#ifndef PORTMAP +#define PORTMAP +#endif + #include #include #include diff --git a/kioslave/nfs/rpc_nfs2_prot.h b/kioslave/nfs/rpc_nfs2_prot.h index 7fa8eb66..72c20f41 100644 --- a/kioslave/nfs/rpc_nfs2_prot.h +++ b/kioslave/nfs/rpc_nfs2_prot.h @@ -6,6 +6,11 @@ #ifndef _RPC_NFS2_PROT_H_RPCGEN #define _RPC_NFS2_PROT_H_RPCGEN +// This is needed on Solaris so that rpc.h defines clnttcp_create etc. +#ifndef PORTMAP +#define PORTMAP +#endif + #include diff --git a/kioslave/nfs/rpc_nfs3_prot.h b/kioslave/nfs/rpc_nfs3_prot.h index abd7d7a4..ed887676 100644 --- a/kioslave/nfs/rpc_nfs3_prot.h +++ b/kioslave/nfs/rpc_nfs3_prot.h @@ -6,6 +6,11 @@ #ifndef _RPC_NFS3_PROT_H_RPCGEN #define _RPC_NFS3_PROT_H_RPCGEN +// This is needed on Solaris so that rpc.h defines clnttcp_create etc. +#ifndef PORTMAP +#define PORTMAP +#endif + #include -- 2.11.0