patch-tirpc_rpc_clnt_soc_h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --- libtirpc-0.2.3.orig/tirpc/rpc/clnt_soc.h 2013-02-13 16:13:59.000000000 +0100
  2. +++ libtirpc-0.2.3/tirpc/rpc/clnt_soc.h 2014-03-22 13:20:52.000000000 +0100
  3. @@ -46,7 +46,6 @@
  4. * with TS-RPC.
  5. */
  6. -#include <sys/cdefs.h>
  7. #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
  8. @@ -61,27 +60,39 @@
  9. * u_int sendsz;
  10. * u_int recvsz;
  11. */
  12. -__BEGIN_DECLS
  13. +#ifdef __cplusplus
  14. +extern "C" {
  15. +#endif
  16. extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
  17. u_int, u_int);
  18. -__END_DECLS
  19. +#ifdef __cplusplus
  20. +}
  21. +#endif
  22. /*
  23. * Raw (memory) rpc.
  24. */
  25. -__BEGIN_DECLS
  26. +#ifdef __cplusplus
  27. +extern "C" {
  28. +#endif
  29. extern CLIENT *clntraw_create(u_long, u_long);
  30. -__END_DECLS
  31. +#ifdef __cplusplus
  32. +}
  33. +#endif
  34. /*
  35. IPv6 socket version
  36. */
  37. #ifdef INET6
  38. -__BEGIN_DECLS
  39. +#ifdef __cplusplus
  40. +extern "C" {
  41. +#endif
  42. extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,
  43. u_int, u_int);
  44. -__END_DECLS
  45. +#ifdef __cplusplus
  46. +}
  47. +#endif
  48. #endif
  49. /*
  50. @@ -105,7 +116,9 @@ __END_DECLS
  51. * u_int sendsz;
  52. * u_int recvsz;
  53. */
  54. -__BEGIN_DECLS
  55. +#ifdef __cplusplus
  56. +extern "C" {
  57. +#endif
  58. extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long,
  59. struct timeval, int *);
  60. extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
  61. @@ -116,7 +129,9 @@ extern CLIENT *clntudp6_create(struct so
  62. extern CLIENT *clntudp6_bufcreate(struct sockaddr_in6 *, u_long, u_long,
  63. struct timeval, int *, u_int, u_int);
  64. #endif
  65. -__END_DECLS
  66. +#ifdef __cplusplus
  67. +}
  68. +#endif
  69. #endif /* _RPC_CLNT_SOC_H */