1 allow usage of getrpcbynumber() instead of getrpcbynumber_r()
3 libtirpc does not implement the reentrant function getrpcbynumber_r(),
4 so allow quota to use the non-reentrant version getrpcbynumber(). This
5 should not be a problem as quota tools are not multi-threaded.
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 ===================================================================
17 +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
19 +if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
20 + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
24 [ --enable-rpc=[yes/no] Enable RPC support [default=yes].],
27 ===================================================================
31 addr.sin_family = AF_INET;
34 +#if HAVE_GETRPCBYNUMBER_R
35 ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
37 + rpcp = getrpcbynumber(number);
40 if (ret == 0 && rpcp != NULL) {
42 ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,