diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2017-11-14 10:41:10 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2017-11-14 11:17:46 -0500 |
commit | e862b2a89c2f1bee0a55361a7eacf3e3c02c7708 (patch) | |
tree | 2ac8bd25f1382710502eba20da4cfb3ace4fcc79 /tirpc/rpc | |
parent | acb9a37977cf0a9630eac74af9adebf35e38e719 (diff) | |
download | ti-rpc-e862b2a89c2f1bee0a55361a7eacf3e3c02c7708.tar.gz |
Add some typedefs to rpc/types.h to allow applications be compiled with -std=iso9899:1990
When disabling the deprecated sunrpc code in glibc and build
openSUSE Tumbleweed completly with libtirpc, I found some programs
using non-standard -std= options. The following patch fixes the
compile problems (Patch is taken from glibc):
Signed-off-by: Thorsten Kukuk <kukuk@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tirpc/rpc')
-rw-r--r-- | tirpc/rpc/types.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h index 52c30a2..f069efa 100644 --- a/tirpc/rpc/types.h +++ b/tirpc/rpc/types.h @@ -65,6 +65,28 @@ typedef int32_t rpc_inline_t; #define mem_alloc(bsize) calloc(1, bsize) #define mem_free(ptr, bsize) free(ptr) + +#if defined __APPLE_CC__ || defined __FreeBSD__ +# define __u_char_defined +# define __daddr_t_defined +#endif + +#ifndef __u_char_defined +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +# define __u_char_defined +#endif +#ifndef __daddr_t_defined +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +# define __daddr_t_defined +#endif + #include <sys/time.h> #include <sys/param.h> #include <stdlib.h> |