packages/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch
nbd c9ea47e8f2 nfs-kernel-server: fix compile issues with uclibc and the new external librpc
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25499 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-02-13 01:45:25 +00:00

48 lines
1.2 KiB
Diff

--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -142,6 +142,7 @@ void auth_unix_gid(FILE *f)
pw = getpwuid(uid);
if (!pw)
rv = -1;
+#ifndef __UCLIBC__
else {
rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
if (rv == -1 && ngroups >= 100) {
@@ -153,6 +154,7 @@ void auth_unix_gid(FILE *f)
groups, &ngroups);
}
}
+#endif /* __UCLIBC__ */
qword_printint(f, uid);
qword_printint(f, time(0)+30*60);
if (rv >= 0) {
--- a/support/nfs/svc_socket.c
+++ b/support/nfs/svc_socket.c
@@ -66,9 +66,13 @@ svc_socket (u_long number, int type, int
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
-
+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
&rpcp);
+#else
+ rpcp = getrpcbynumber (number);
+ ret = 0;
+#endif
if (ret == 0 && rpcp != NULL)
{
/* First try name. */
--- a/utils/statd/sm_inter_svc.c
+++ b/utils/statd/sm_inter_svc.c
@@ -10,7 +10,9 @@
#include <stdlib.h>
#include <netdb.h>
#include <signal.h>
+#ifndef __UCLIBC__
#include <sys/ttycom.h>
+#endif
#include <memory.h>
#include <sys/socket.h>
#include <netinet/in.h>