mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 20:07:25 +00:00
yp-tools: fix compile errors
Fix two fatal warnings. The cast error only occurs for some architectures. Not applicable to yp-tools-4.x. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
committed by
Joe MacDonald
parent
c7e8da3819
commit
490d792737
@@ -0,0 +1,52 @@
|
|||||||
|
yp-tools: avoid fatal cast warning
|
||||||
|
|
||||||
|
The way casting is done, we will get a fatal alignment warning on some
|
||||||
|
architectures. This patch cheats our way around this.
|
||||||
|
|
||||||
|
We also eliminate an unused constant which causes a fatal warning.
|
||||||
|
|
||||||
|
Upstream-status: Inappropriate [code does not exist in version 4.x]
|
||||||
|
|
||||||
|
Signed-off-by: Joe Slater <jslater@windriver.com>
|
||||||
|
|
||||||
|
--- a/lib/do_ypcall.c
|
||||||
|
+++ b/lib/do_ypcall.c
|
||||||
|
@@ -44,7 +44,6 @@ struct dom_binding
|
||||||
|
typedef struct dom_binding dom_binding;
|
||||||
|
|
||||||
|
static const struct timeval RPCTIMEOUT = {25, 0};
|
||||||
|
-static const struct timeval UDPTIMEOUT = {5, 0};
|
||||||
|
static int const MAXTRIES = 2;
|
||||||
|
static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
static dom_binding *ypbindlist = NULL;
|
||||||
|
@@ -381,7 +380,7 @@ __ypclnt_call (u_long prog, xdrproc_t xa
|
||||||
|
|
||||||
|
int
|
||||||
|
do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
|
||||||
|
- caddr_t req, xdrproc_t xres, caddr_t resp)
|
||||||
|
+ caddr_t req, xdrproc_t xres, void *resp)
|
||||||
|
{
|
||||||
|
dom_binding *ydb;
|
||||||
|
int status;
|
||||||
|
@@ -450,7 +449,7 @@ do_ypcall (const char *domain, u_long pr
|
||||||
|
/* Like do_ypcall, but translate the status value if necessary. */
|
||||||
|
int
|
||||||
|
do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
|
||||||
|
- caddr_t req, xdrproc_t xres, caddr_t resp)
|
||||||
|
+ caddr_t req, xdrproc_t xres, void *resp)
|
||||||
|
{
|
||||||
|
int status = do_ypcall (domain, prog, xargs, req, xres, resp);
|
||||||
|
if (status == YPERR_SUCCESS)
|
||||||
|
--- a/lib/internal.h
|
||||||
|
+++ b/lib/internal.h
|
||||||
|
@@ -17,8 +17,8 @@
|
||||||
|
#define _INTERNAL_H_
|
||||||
|
|
||||||
|
extern int do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
|
||||||
|
- caddr_t req, xdrproc_t xres, caddr_t resp);
|
||||||
|
+ caddr_t req, xdrproc_t xres, void *resp);
|
||||||
|
extern int do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
|
||||||
|
- caddr_t req, xdrproc_t xres, caddr_t resp);
|
||||||
|
+ caddr_t req, xdrproc_t xres, void *resp);
|
||||||
|
extern int yp_maplist (const char *, struct ypmaplist **);
|
||||||
|
#endif
|
||||||
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
|
|||||||
and ypdomainname. \
|
and ypdomainname. \
|
||||||
"
|
"
|
||||||
|
|
||||||
PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
|
|
||||||
|
|
||||||
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
|
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
|
||||||
file://domainname.service \
|
file://domainname.service \
|
||||||
file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
|
file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
|
||||||
|
file://alignment-cheat.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
|
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
|
||||||
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
|
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
|
||||||
|
|||||||
Reference in New Issue
Block a user