From 34e6a1ce23f1ef5f627447286c4ae768d8bcb1ad Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 13 Sep 2009 12:20:02 -0700 Subject: nfs-utils_1.1.2.bb: Fix compilation on uclibc Signed-off-by: Khem Raj --- .../nfs-utils-1.1.2/nfs-utils-uclibc-compile.patch | 49 ++++++++++++++++++++++ recipes/nfs-utils/nfs-utils_1.1.2.bb | 3 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 recipes/nfs-utils/nfs-utils-1.1.2/nfs-utils-uclibc-compile.patch (limited to 'recipes/nfs-utils') diff --git a/recipes/nfs-utils/nfs-utils-1.1.2/nfs-utils-uclibc-compile.patch b/recipes/nfs-utils/nfs-utils-1.1.2/nfs-utils-uclibc-compile.patch new file mode 100644 index 0000000000..f242eade45 --- /dev/null +++ b/recipes/nfs-utils/nfs-utils-1.1.2/nfs-utils-uclibc-compile.patch @@ -0,0 +1,49 @@ +--- a/support/nfs/svc_socket.c.org 2007-05-11 03:40:57 +0000 ++++ b/support/nfs/svc_socket.c 2007-10-24 15:20:05 +0000 +@@ -67,8 +67,13 @@ + memset (&addr, 0, sizeof (addr)); + addr.sin_family = AF_INET; + ++#ifdef __UCLIBC__ ++ rpcp = getrpcbynumber (number); ++ ret = 0; ++#else + ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, + &rpcp); ++#endif + if (ret == 0 && rpcp != NULL) + { + /* First try name. */ +--- a/utils/mountd/cache.c.org 2007-05-11 03:40:57 +0000 ++++ b/utils/mountd/cache.c 2007-10-24 15:21:53 +0000 +@@ -131,6 +131,7 @@ + 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) { +@@ -142,6 +143,7 @@ + groups, &ngroups); + } + } ++#endif + qword_printint(f, uid); + qword_printint(f, time(0)+30*60); + if (rv >= 0) { +--- a/tools/rpcgen/rpc_cout.c.org 2007-05-11 03:40:57 +0000 ++++ b/tools/rpcgen/rpc_cout.c 2007-10-24 15:23:17 +0000 +@@ -647,7 +647,11 @@ + int freed=0; + + if(flag == PUT) ++#ifdef __UCLIBC__ ++ f_print(fout,"\t\t IXDR_PUT_"); ++#else + f_print(fout,"\t\t (void) IXDR_PUT_"); ++#endif + else + if(rel== REL_ALIAS) + f_print(fout,"\t\t objp->%s = IXDR_GET_",decl->name); + diff --git a/recipes/nfs-utils/nfs-utils_1.1.2.bb b/recipes/nfs-utils/nfs-utils_1.1.2.bb index 7f29d8a851..cdd5d372cd 100644 --- a/recipes/nfs-utils/nfs-utils_1.1.2.bb +++ b/recipes/nfs-utils/nfs-utils_1.1.2.bb @@ -3,12 +3,13 @@ PRIORITY = "optional" SECTION = "console/network" LICENSE = "GPL" -PR = "r5" +PR = "r6" DEPENDS = "e2fsprogs-libs tcp-wrappers libevent" SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \ file://nfs-utils-tools-unset-cflags.patch;patch=1 \ + file://nfs-utils-uclibc-compile.patch;patch=1 \ file://nfsserver \ " -- cgit 1.2.3-korg