patch-tirpc_rpc_rpc_h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- libtirpc-0.2.3.orig/tirpc/rpc/rpc.h 2013-02-13 16:13:59.000000000 +0100
  2. +++ libtirpc-0.2.3/tirpc/rpc/rpc.h 2014-03-22 13:20:52.000000000 +0100
  3. @@ -79,9 +79,11 @@
  4. #define UDPMSGSIZE 8800
  5. #endif
  6. -__BEGIN_DECLS
  7. +#ifdef __cplusplus
  8. +extern "C" {
  9. +#endif
  10. extern int get_myaddress(struct sockaddr_in *);
  11. -extern int bindresvport(int, struct sockaddr_in *) __THROW;
  12. +extern int bindresvport(int, struct sockaddr_in *);
  13. extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
  14. xdrproc_t, xdrproc_t);
  15. extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
  16. @@ -93,18 +95,24 @@ struct netbuf *uaddr2taddr(const struct
  17. struct sockaddr;
  18. extern int bindresvport_sa(int, struct sockaddr *);
  19. -__END_DECLS
  20. +#ifdef __cplusplus
  21. +}
  22. +#endif
  23. /*
  24. * The following are not exported interfaces, they are for internal library
  25. * and rpcbind use only. Do not use, they may change without notice.
  26. */
  27. -__BEGIN_DECLS
  28. +#ifdef __cplusplus
  29. +extern "C" {
  30. +#endif
  31. int __rpc_nconf2fd(const struct netconfig *);
  32. int __rpc_nconf2fd_flags(const struct netconfig *, int);
  33. int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
  34. int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
  35. u_int __rpc_get_t_size(int, int, int);
  36. -__END_DECLS
  37. +#ifdef __cplusplus
  38. +}
  39. +#endif
  40. #endif /* !_RPC_RPC_H */