Skip to contentSkip to conversation

yp-tools: fix compile errors

PATCH Superseded Joe Slater 4 participants 5 messages Aug 17, 2016 – Aug 18, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 yp-tools: fix compile errors

Fix two fatal warnings. The cast error only
occurs for some architectures.

---
 .../nis/yp-tools/alignment-cheat.patch             |   58 ++++++++++++++++++++
 .../recipes-support/nis/yp-tools_3.3.bb            |    3 +-
 2 files changed, 59 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +58 -0
new file mode 100644
index 0000000..856e42e
@@ -0,0 +1,58 @@
+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: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -44,7 +44,9 @@ struct dom_binding
+ typedef struct dom_binding dom_binding;
+ 
+ static const struct timeval RPCTIMEOUT = {25, 0};
++#if 0
+ static const struct timeval UDPTIMEOUT = {5, 0};
++#endif
+ static int const MAXTRIES = 2;
+ static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
+ static dom_binding *ypbindlist = NULL;
+@@ -381,7 +383,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,9 +452,9 @@ 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);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (void *) resp);
+   if (status == YPERR_SUCCESS)
+     /* We cast to ypresp_val although the pointer could also be of
+        type ypresp_key_val or ypresp_master or ypresp_order or
+--- 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
meta-networking/recipes-support/nis/yp-tools_3.3.bb +1 -2
index b89f0b8..69217fa 100644
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
 and ypdomainname. \
 "
 
-PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
-
 SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
            file://domainname.service \
            file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
+           file://alignment-cheat.patch \
 "
 SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
 SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 19 lines · Joe Slater

Fix two fatal warnings. The cast error only
occurs for some architectures.

---
.../nis/yp-tools/alignment-cheat.patch | 58 ++++++++++++++++++++
.../recipes-support/nis/yp-tools_3.3.bb | 3 +-

2 files changed, 59 insertions(+), 2 deletions(-)

create mode 100644 meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +0 -0
new file mode 100644
index 0000000..856e42e

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 5

Quoted 5 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
@@ -0,0 +1,58 @@
+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.
+

These changes look fine, however you should run it by the upstream.

Quoted 6 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +6 -0
+We also eliminate an unused constant which causes a fatal warning.
+
+Upstream-status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 21

Quoted 10 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +10 -0
+
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -44,7 +44,9 @@ struct dom_binding
+ typedef struct dom_binding dom_binding;
+
+ static const struct timeval RPCTIMEOUT = {25, 0};
++#if 0
+ static const struct timeval UDPTIMEOUT = {5, 0};
++#endif

perhaps its better to remove the unused code instead of making preprocessor work even more.

Quoted 11 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+ static int const MAXTRIES = 2;
+ static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
+ static dom_binding *ypbindlist = NULL;
+@@ -381,7 +383,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;

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 42

Quoted 10 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +10 -0
+   int status;
+@@ -450,9 +452,9 @@ 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);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (void *) resp);

resp is already a void pointer why is this typecast needed ?

Quoted 41 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +16 -0
+   if (status == YPERR_SUCCESS)
+     /* We cast to ypresp_val although the pointer could also be of
+        type ypresp_key_val or ypresp_master or ypresp_order or
+--- 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
meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0
index b89f0b8..69217fa 100644
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
 and ypdomainname. \

"

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -2
-PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
-
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
           file://domainname.service \
           file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \

+ file://alignment-cheat.patch \
"
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50" --
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 24 lines

-----Original Message-----
From: [email protected] [mailto:openembedded-devel- [email protected]] On Behalf Of Khem Raj
Sent: Wednesday, August 17, 2016 4:20 PM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH 1/1] yp-tools: fix compile errors

meta-

Quoted 13 lines · Joe Slater

Fix two fatal warnings. The cast error only
occurs for some architectures.

---
.../nis/yp-tools/alignment-cheat.patch | 58 ++++++++++++++++++++
.../recipes-support/nis/yp-tools_3.3.bb | 3 +-

2 files changed, 59 insertions(+), 2 deletions(-)

create mode 100644 meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch

meta- renamed from meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch +0 -0

networking/recipes-support/nis/yp-tools/alignment-cheat.patch

Quoted 12 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 5

Quoted 10 lines

new file mode 100644
index 0000000..856e42e

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
@@ -0,0 +1,58 @@
+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.
+

These changes look fine, however you should run it by the upstream.

Version 4.2 of the tools seems to bear little resemblance to 3.3. The code and structures patched here no longer exist.

Quoted 12 lines
Quoted 12 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+We also eliminate an unused constant which causes a fatal warning.
+
+Upstream-status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -44,7 +44,9 @@ struct dom_binding
+ typedef struct dom_binding dom_binding;
Quoted 8 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 21

Quoted 5 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
+
+ static const struct timeval RPCTIMEOUT = {25, 0};
++#if 0
+ static const struct timeval UDPTIMEOUT = {5, 0};
++#endif

perhaps its better to remove the unused code instead of making preprocessor work even more.

Probably. I think RPCTIMEOUT made it to 4.2, but UDPTIMEOUT did not.

Quoted 23 lines
Quoted 12 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+ static int const MAXTRIES = 2;
+ static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
+ static dom_binding *ypbindlist = NULL;
+@@ -381,7 +383,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;

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 42

Quoted 10 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +10 -0
+   int status;
+@@ -450,9 +452,9 @@ 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);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (void *) resp);
Quoted 1 line

resp is already a void pointer why is this typecast needed ?

I put it in someplace along the line in trying to fix the problem and forgot to take it out.

V2 or leave it? This code does not look like it's going anywhere beyond here.

Joe

Quoted 43 lines

meta-

Quoted 18 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +16 -0
+   if (status == YPERR_SUCCESS)
+     /* We cast to ypresp_val although the pointer could also be of
+        type ypresp_key_val or ypresp_master or ypresp_order or
+--- 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
meta- renamed from meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0

networking/recipes-support/nis/yp-tools_3.3.bb

Quoted 24 lines

index b89f0b8..69217fa 100644

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
 and ypdomainname. \

"

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -2
-PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
-
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
           file://domainname.service \
           file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \

+ file://alignment-cheat.patch \
"
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50" --
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 40 lines · Joseph
Quoted 25 lines

-----Original Message-----
From: [email protected] [mailto:openembedded-devel- [email protected]] On Behalf Of Khem Raj
Sent: Wednesday, August 17, 2016 4:20 PM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH 1/1] yp-tools: fix compile errors

meta-

Quoted 13 lines · Joe Slater

Fix two fatal warnings. The cast error only
occurs for some architectures.

---
.../nis/yp-tools/alignment-cheat.patch | 58 ++++++++++++++++++++
.../recipes-support/nis/yp-tools_3.3.bb | 3 +-

2 files changed, 59 insertions(+), 2 deletions(-)

create mode 100644 meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch

meta- renamed from meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch +0 -0

networking/recipes-support/nis/yp-tools/alignment-cheat.patch

Quoted 12 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 5

Quoted 10 lines

new file mode 100644
index 0000000..856e42e

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
@@ -0,0 +1,58 @@
+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.
+

These changes look fine, however you should run it by the upstream.

Quoted 2 lines

Version 4.2 of the tools seems to bear little resemblance to 3.3. The code and structures patched here no longer exist.

OK

Quoted 47 lines
Quoted 13 lines
Quoted 13 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+We also eliminate an unused constant which causes a fatal warning.
+
+Upstream-status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -44,7 +44,9 @@ struct dom_binding
+ typedef struct dom_binding dom_binding;
Quoted 8 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 21

Quoted 5 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
+
+ static const struct timeval RPCTIMEOUT = {25, 0};
++#if 0
+ static const struct timeval UDPTIMEOUT = {5, 0};
++#endif

perhaps its better to remove the unused code instead of making preprocessor work even more.

Probably. I think RPCTIMEOUT made it to 4.2, but UDPTIMEOUT did not.

Quoted 23 lines
Quoted 22 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +21 -0
+ static int const MAXTRIES = 2;
+ static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
+ static dom_binding *ypbindlist = NULL;
+@@ -381,7 +383,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,9 +452,9 @@ 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);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (void *) resp);
Quoted 7 lines
Quoted 1 line

resp is already a void pointer why is this typecast needed ?

I put it in someplace along the line in trying to fix the problem and forgot to take it out.

V2 or leave it? This code does not look like it's going anywhere beyond here.

v2 just for this.

Quoted 52 lines

Joe

Quoted 38 lines

meta-

Quoted 18 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +16 -0
+   if (status == YPERR_SUCCESS)
+     /* We cast to ypresp_val although the pointer could also be of
+        type ypresp_key_val or ypresp_master or ypresp_order or
+--- 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
meta- renamed from meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0

networking/recipes-support/nis/yp-tools_3.3.bb

Quoted 19 lines

index b89f0b8..69217fa 100644

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
 and ypdomainname. \

"

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -2
-PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
-
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
          file://domainname.service \
          file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \

+ file://alignment-cheat.patch \
"
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50" --
1.7.9.5

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#4 lore raw
In reply to Slater, Joseph
Quoted 37 lines · Joseph
Quoted 24 lines

-----Original Message-----
From: [email protected] [mailto:openembedded-devel- [email protected]] On Behalf Of Khem Raj
Sent: Wednesday, August 17, 2016 4:20 PM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH 1/1] yp-tools: fix compile errors

meta-

Quoted 13 lines · Joe Slater

Fix two fatal warnings. The cast error only
occurs for some architectures.

---
.../nis/yp-tools/alignment-cheat.patch | 58 ++++++++++++++++++++
.../recipes-support/nis/yp-tools_3.3.bb | 3 +-

2 files changed, 59 insertions(+), 2 deletions(-)

create mode 100644 meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch

meta- renamed from meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch +0 -0

networking/recipes-support/nis/yp-tools/alignment-cheat.patch

Quoted 12 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 5

Quoted 10 lines

new file mode 100644
index 0000000..856e42e

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
@@ -0,0 +1,58 @@
+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.
+

These changes look fine, however you should run it by the upstream.

Quoted 2 lines

Version 4.2 of the tools seems to bear little resemblance to 3.3. The code and structures patched here no longer exist.

Hmm, in that case, I wonder why we wouldn't just do the uprev to 3.5 (the end of the line for the 3.x series) or 4.2. More thinking out loud than anything, I suppose, but if you know of a good reason to not push 3.3 off a cliff entirely, let me know.

Quoted 20 lines
Quoted 11 lines
Quoted 11 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+We also eliminate an unused constant which causes a fatal warning.
+
+Upstream-status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -44,7 +44,9 @@ struct dom_binding
+ typedef struct dom_binding dom_binding;
Quoted 8 lines

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 21

Quoted 5 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +5 -0
+
+ static const struct timeval RPCTIMEOUT = {25, 0};
++#if 0
+ static const struct timeval UDPTIMEOUT = {5, 0};
++#endif

perhaps its better to remove the unused code instead of making preprocessor work even more.

Quoted 1 line

Probably. I think RPCTIMEOUT made it to 4.2, but UDPTIMEOUT did not.

So please make this change in your v2, then. It's a personal bias thing, probably, but it seems to me there's almost never any value to leaving a "#if 0" block in code these days. Particularly not when we're talking about a patch that gets applied by quilt in the build system which is then trivial to restore the deleted code if, for some reason, you need it.

-J.

Quoted 76 lines
Quoted 22 lines
Quoted 11 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +11 -0
+ static int const MAXTRIES = 2;
+ static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
+ static dom_binding *ypbindlist = NULL;
+@@ -381,7 +383,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;

meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch line 42

Quoted 10 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +10 -0
+   int status;
+@@ -450,9 +452,9 @@ 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);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (void *) resp);
Quoted 1 line

resp is already a void pointer why is this typecast needed ?

I put it in someplace along the line in trying to fix the problem and forgot to take it out.

V2 or leave it? This code does not look like it's going anywhere beyond here.

Joe

Quoted 43 lines

meta-

Quoted 18 lines
meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch new file +16 -0
+   if (status == YPERR_SUCCESS)
+     /* We cast to ypresp_val although the pointer could also be of
+        type ypresp_key_val or ypresp_master or ypresp_order or
+--- 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
meta- renamed from meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0

networking/recipes-support/nis/yp-tools_3.3.bb

Quoted 24 lines

index b89f0b8..69217fa 100644

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -0
@@ -11,11 +11,10 @@ ypwhich, yppasswd, domainname, nisdomainname \
 and ypdomainname. \

"

meta-networking/recipes-support/nis/yp-tools_3.3.bb +0 -2
-PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
-
SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
           file://domainname.service \
           file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \

+ file://alignment-cheat.patch \
"
SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50" --
1.7.9.5

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 2 lines
-Joe MacDonald.
:wq