aboutsummaryrefslogtreecommitdiff
path: root/package/quota/01-tools-getrpcbynumber.patch
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-11-09 14:30:52 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-11-09 21:45:46 +0100
commit0051046b4d73bd9e373393dc4cb9be155d7eb952 (patch)
tree604c4f43fdc6cdf353f54e8c48c2d9335a308e94 /package/quota/01-tools-getrpcbynumber.patch
parent44f89c38dc72e042d8190f4ca15b26abdb7e69b4 (diff)
downloadbuildroot-0051046b4d73bd9e373393dc4cb9be155d7eb952.tar.gz
buildroot-0051046b4d73bd9e373393dc4cb9be155d7eb952.tar.bz2
quota: rename patch to the new convention
As a preparation to the introduction of an additional patch to quota, let's rename the existing patch to the new naming convention. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/quota/01-tools-getrpcbynumber.patch')
-rw-r--r--package/quota/01-tools-getrpcbynumber.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/quota/01-tools-getrpcbynumber.patch b/package/quota/01-tools-getrpcbynumber.patch
new file mode 100644
index 0000000000..899db914f0
--- /dev/null
+++ b/package/quota/01-tools-getrpcbynumber.patch
@@ -0,0 +1,42 @@
+allow usage of getrpcbynumber() instead of getrpcbynumber_r()
+
+libtirpc does not implement the reentrant function getrpcbynumber_r(),
+so allow quota to use the non-reentrant version getrpcbynumber(). This
+should not be a problem as quota tools are not multi-threaded.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -182,6 +182,12 @@
+ AC_C_CONST
+ AC_C_INLINE
+
++AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
++
++if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
++ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
++fi
++
+ AC_ARG_ENABLE(rpc,
+ [ --enable-rpc=[yes/no] Enable RPC support [default=yes].],
+ ,
+Index: b/svc_socket.c
+===================================================================
+--- a/svc_socket.c
++++ b/svc_socket.c
+@@ -55,7 +55,12 @@
+ addr.sin_family = AF_INET;
+
+ if (!port) {
++#if HAVE_GETRPCBYNUMBER_R
+ ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
++#else
++ rpcp = getrpcbynumber(number);
++ ret = 0;
++#endif
+ if (ret == 0 && rpcp != NULL) {
+ /* First try name */
+ ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,