patch-support_nfs_svc_socket_c 575 B

1234567891011121314151617
  1. --- nfs-utils-1.3.0.orig/support/nfs/svc_socket.c 2014-03-25 16:12:07.000000000 +0100
  2. +++ nfs-utils-1.3.0/support/nfs/svc_socket.c 2014-05-17 21:03:27.077197789 +0200
  3. @@ -42,8 +42,14 @@ int getservport(u_long number, const cha
  4. struct servent servbuf, *servp = NULL;
  5. int ret;
  6. +#if HAVE_GETRPCBYNUMBER_R
  7. ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
  8. &rpcp);
  9. +#else
  10. + rpcp = getrpcbynumber(number);
  11. + ret = 0;
  12. +#endif
  13. +
  14. if (ret == 0 && rpcp != NULL) {
  15. /* First try name. */
  16. ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,