All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
@ 2016-01-23 21:27 Bernd Kuhls
  2016-05-15 13:45 ` Matthew Weber
  0 siblings, 1 reply; 6+ messages in thread
From: Bernd Kuhls @ 2016-01-23 21:27 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/943/9432748bf7b1e24db9fcb0a8cce6942fcdf6be5b/
http://autobuild.buildroot.net/results/083/083c61f43c2f1f0dec69d44583b447a0520933b7/
and many others

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 .../0002-Use-standard-unsigned-integer-types.patch | 213 +++++++++++++++++++++
 1 file changed, 213 insertions(+)
 create mode 100644 package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch

diff --git a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
new file mode 100644
index 0000000..200bf23
--- /dev/null
+++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
@@ -0,0 +1,213 @@
+Fix musl build
+
+Downloaded from:
+https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
+
+Patch was reported upstream:
+http://sourceforge.net/p/igmpproxy/bugs/22/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+
+From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 3 Mar 2014 12:11:26 +0000
+Subject: [PATCH] Use standard unsigned integer types
+
+Use the stanard unsigned integer types instead of the non-standard
+u_char, u_short and u_int.
+
+This fixes build with musl libc.
+
+(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
+
+Conflicts:
+	src/igmp.c
+---
+ src/igmp.c         |  4 ++--
+ src/kern.c         |  4 ++--
+ src/lib.c          | 10 +++++-----
+ src/os-dragonfly.h |  4 ++--
+ src/os-freebsd.h   |  4 ++--
+ src/os-linux.h     |  4 ++--
+ src/os-netbsd.h    |  4 ++--
+ src/os-openbsd.h   |  4 ++--
+ 8 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/src/igmp.c b/src/igmp.c
+index a0cd27d..92f37e7 100644
+--- a/src/igmp.c
++++ b/src/igmp.c
+@@ -79,7 +79,7 @@ void initIgmp() {
+ /**
+ *   Finds the textual name of the supplied IGMP request.
+ */
+-char *igmpPacketKind(u_int type, u_int code) {
++char *igmpPacketKind(unsigned int type, unsigned int code) {
+     static char unknown[20];
+ 
+     switch (type) {
+@@ -226,7 +226,7 @@ void buildIgmp(uint32_t src, uint32_t dst, int type, int code, uint32_t group, i
+     igmp->igmp_code         = code;
+     igmp->igmp_group.s_addr = group;
+     igmp->igmp_cksum        = 0;
+-    igmp->igmp_cksum        = inetChksum((u_short *)igmp,
++    igmp->igmp_cksum        = inetChksum((unsigned short *)igmp,
+                                          IGMP_MINLEN + datalen);
+ }
+ 
+diff --git a/src/kern.c b/src/kern.c
+index 2055636..12c613f 100644
+--- a/src/kern.c
++++ b/src/kern.c
+@@ -82,7 +82,7 @@ void k_hdr_include(int hdrincl) {
+ 
+ void k_set_ttl(int t) {
+ #ifndef RAW_OUTPUT_IS_RAW
+-    u_char ttl;
++    unsigned char ttl;
+ 
+     ttl = t;
+     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_TTL,
+@@ -94,7 +94,7 @@ void k_set_ttl(int t) {
+ 
+ 
+ void k_set_loop(int l) {
+-    u_char loop;
++    unsigned char loop;
+ 
+     loop = l;
+     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_LOOP,
+diff --git a/src/lib.c b/src/lib.c
+index 70a730a..0eed9ce 100644
+--- a/src/lib.c
++++ b/src/lib.c
+@@ -61,9 +61,9 @@ char *fmtInAdr( char *St, struct in_addr InAdr ) {
+  * Convert an IP address in u_long (network) format into a printable string.
+  */
+ char *inetFmt(uint32_t addr, char *s) {
+-    register u_char *a;
++    register unsigned char *a;
+ 
+-    a = (u_char *)&addr;
++    a = (unsigned char *)&addr;
+     sprintf(s, "%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
+     return(s);
+ }
+@@ -74,15 +74,15 @@ char *inetFmt(uint32_t addr, char *s) {
+  * string including the netmask as a number of bits.
+  */
+ char *inetFmts(uint32_t addr, uint32_t mask, char *s) {
+-    register u_char *a, *m;
++    register unsigned char *a, *m;
+     int bits;
+ 
+     if ((addr == 0) && (mask == 0)) {
+         sprintf(s, "default");
+         return(s);
+     }
+-    a = (u_char *)&addr;
+-    m = (u_char *)&mask;
++    a = (unsigned char *)&addr;
++    m = (unsigned char *)&mask;
+     bits = 33 - ffs(ntohl(mask));
+ 
+     if (m[3] != 0) sprintf(s, "%u.%u.%u.%u/%d", a[0], a[1], a[2], a[3],
+diff --git a/src/os-dragonfly.h b/src/os-dragonfly.h
+index 735401c..189dfb2 100644
+--- a/src/os-dragonfly.h
++++ b/src/os-dragonfly.h
+@@ -3,12 +3,12 @@
+ #include <netinet/ip.h>
+ #include <netinet/igmp.h>
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-freebsd.h b/src/os-freebsd.h
+index ca01cc5..60b897c 100644
+--- a/src/os-freebsd.h
++++ b/src/os-freebsd.h
+@@ -12,12 +12,12 @@
+ #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
+ #endif
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-linux.h b/src/os-linux.h
+index 7504b1f..6cdcdc7 100644
+--- a/src/os-linux.h
++++ b/src/os-linux.h
+@@ -4,12 +4,12 @@
+ #include <netinet/ip.h>
+ #include <netinet/igmp.h>
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ntohs(ip->ip_len) - (ip->ip_hl << 2);
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = htons(len);
+ }
+diff --git a/src/os-netbsd.h b/src/os-netbsd.h
+index 17bd5fa..22f74e5 100644
+--- a/src/os-netbsd.h
++++ b/src/os-netbsd.h
+@@ -8,12 +8,12 @@
+ #define IGMP_V2_MEMBERSHIP_REPORT IGMP_v2_HOST_MEMBERSHIP_REPORT
+ #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-openbsd.h b/src/os-openbsd.h
+index 873e5fb..75ddf80 100644
+--- a/src/os-openbsd.h
++++ b/src/os-openbsd.h
+@@ -10,12 +10,12 @@
+ 
+ #define INADDR_ALLRTRS_GROUP INADDR_ALLROUTERS_GROUP
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ntohs(ip->ip_len) - (ip->ip_hl << 2);
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = htons(len);
+ }
+-- 
+1.9.0
+
-- 
2.7.0.rc3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
  2016-01-23 21:27 [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build Bernd Kuhls
@ 2016-05-15 13:45 ` Matthew Weber
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Weber @ 2016-05-15 13:45 UTC (permalink / raw)
  To: buildroot

Bernd,

On Sat, Jan 23, 2016 at 3:27 PM, Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
> Fixes
> http://autobuild.buildroot.net/results/943/9432748bf7b1e24db9fcb0a8cce6942fcdf6be5b/
> http://autobuild.buildroot.net/results/083/083c61f43c2f1f0dec69d44583b447a0520933b7/
> and many others
>

I'm looking into the current igmp musl failures and noticed this
patch.  It doesn't seem to be listed in patchworks at this point, was
there rework requested possibly over IRC (I couldn't find any email
traffic)?

Thanks!
Matt

> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  .../0002-Use-standard-unsigned-integer-types.patch | 213 +++++++++++++++++++++
>  1 file changed, 213 insertions(+)
>  create mode 100644 package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
>
> diff --git a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> new file mode 100644
> index 0000000..200bf23
> --- /dev/null
> +++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> @@ -0,0 +1,213 @@
> +Fix musl build
> +
> +Downloaded from:
> +https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
> +
> +Patch was reported upstream:
> +http://sourceforge.net/p/igmpproxy/bugs/22/
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +
> +
> +From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
> +From: Natanael Copa <ncopa@alpinelinux.org>
> +Date: Mon, 3 Mar 2014 12:11:26 +0000
> +Subject: [PATCH] Use standard unsigned integer types
> +
> +Use the stanard unsigned integer types instead of the non-standard
> +u_char, u_short and u_int.
> +
> +This fixes build with musl libc.
> +
> +(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
> +
> +Conflicts:
> +       src/igmp.c
> +---
> + src/igmp.c         |  4 ++--
> + src/kern.c         |  4 ++--
> + src/lib.c          | 10 +++++-----
> + src/os-dragonfly.h |  4 ++--
> + src/os-freebsd.h   |  4 ++--
> + src/os-linux.h     |  4 ++--
> + src/os-netbsd.h    |  4 ++--
> + src/os-openbsd.h   |  4 ++--
> + 8 files changed, 19 insertions(+), 19 deletions(-)
> +
> +diff --git a/src/igmp.c b/src/igmp.c
> +index a0cd27d..92f37e7 100644
> +--- a/src/igmp.c
> ++++ b/src/igmp.c
> +@@ -79,7 +79,7 @@ void initIgmp() {
> + /**
> + *   Finds the textual name of the supplied IGMP request.
> + */
> +-char *igmpPacketKind(u_int type, u_int code) {
> ++char *igmpPacketKind(unsigned int type, unsigned int code) {
> +     static char unknown[20];
> +
> +     switch (type) {
> +@@ -226,7 +226,7 @@ void buildIgmp(uint32_t src, uint32_t dst, int type, int code, uint32_t group, i
> +     igmp->igmp_code         = code;
> +     igmp->igmp_group.s_addr = group;
> +     igmp->igmp_cksum        = 0;
> +-    igmp->igmp_cksum        = inetChksum((u_short *)igmp,
> ++    igmp->igmp_cksum        = inetChksum((unsigned short *)igmp,
> +                                          IGMP_MINLEN + datalen);
> + }
> +
> +diff --git a/src/kern.c b/src/kern.c
> +index 2055636..12c613f 100644
> +--- a/src/kern.c
> ++++ b/src/kern.c
> +@@ -82,7 +82,7 @@ void k_hdr_include(int hdrincl) {
> +
> + void k_set_ttl(int t) {
> + #ifndef RAW_OUTPUT_IS_RAW
> +-    u_char ttl;
> ++    unsigned char ttl;
> +
> +     ttl = t;
> +     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_TTL,
> +@@ -94,7 +94,7 @@ void k_set_ttl(int t) {
> +
> +
> + void k_set_loop(int l) {
> +-    u_char loop;
> ++    unsigned char loop;
> +
> +     loop = l;
> +     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_LOOP,
> +diff --git a/src/lib.c b/src/lib.c
> +index 70a730a..0eed9ce 100644
> +--- a/src/lib.c
> ++++ b/src/lib.c
> +@@ -61,9 +61,9 @@ char *fmtInAdr( char *St, struct in_addr InAdr ) {
> +  * Convert an IP address in u_long (network) format into a printable string.
> +  */
> + char *inetFmt(uint32_t addr, char *s) {
> +-    register u_char *a;
> ++    register unsigned char *a;
> +
> +-    a = (u_char *)&addr;
> ++    a = (unsigned char *)&addr;
> +     sprintf(s, "%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
> +     return(s);
> + }
> +@@ -74,15 +74,15 @@ char *inetFmt(uint32_t addr, char *s) {
> +  * string including the netmask as a number of bits.
> +  */
> + char *inetFmts(uint32_t addr, uint32_t mask, char *s) {
> +-    register u_char *a, *m;
> ++    register unsigned char *a, *m;
> +     int bits;
> +
> +     if ((addr == 0) && (mask == 0)) {
> +         sprintf(s, "default");
> +         return(s);
> +     }
> +-    a = (u_char *)&addr;
> +-    m = (u_char *)&mask;
> ++    a = (unsigned char *)&addr;
> ++    m = (unsigned char *)&mask;
> +     bits = 33 - ffs(ntohl(mask));
> +
> +     if (m[3] != 0) sprintf(s, "%u.%u.%u.%u/%d", a[0], a[1], a[2], a[3],
> +diff --git a/src/os-dragonfly.h b/src/os-dragonfly.h
> +index 735401c..189dfb2 100644
> +--- a/src/os-dragonfly.h
> ++++ b/src/os-dragonfly.h
> +@@ -3,12 +3,12 @@
> + #include <netinet/ip.h>
> + #include <netinet/igmp.h>
> +
> +-static inline u_short ip_data_len(const struct ip *ip)
> ++static inline unsigned short ip_data_len(const struct ip *ip)
> + {
> +       return ip->ip_len;
> + }
> +
> +-static inline void ip_set_len(struct ip *ip, u_short len)
> ++static inline void ip_set_len(struct ip *ip, unsigned short len)
> + {
> +       ip->ip_len = len;
> + }
> +diff --git a/src/os-freebsd.h b/src/os-freebsd.h
> +index ca01cc5..60b897c 100644
> +--- a/src/os-freebsd.h
> ++++ b/src/os-freebsd.h
> +@@ -12,12 +12,12 @@
> + #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
> + #endif
> +
> +-static inline u_short ip_data_len(const struct ip *ip)
> ++static inline unsigned short ip_data_len(const struct ip *ip)
> + {
> +       return ip->ip_len;
> + }
> +
> +-static inline void ip_set_len(struct ip *ip, u_short len)
> ++static inline void ip_set_len(struct ip *ip, unsigned short len)
> + {
> +       ip->ip_len = len;
> + }
> +diff --git a/src/os-linux.h b/src/os-linux.h
> +index 7504b1f..6cdcdc7 100644
> +--- a/src/os-linux.h
> ++++ b/src/os-linux.h
> +@@ -4,12 +4,12 @@
> + #include <netinet/ip.h>
> + #include <netinet/igmp.h>
> +
> +-static inline u_short ip_data_len(const struct ip *ip)
> ++static inline unsigned short ip_data_len(const struct ip *ip)
> + {
> +       return ntohs(ip->ip_len) - (ip->ip_hl << 2);
> + }
> +
> +-static inline void ip_set_len(struct ip *ip, u_short len)
> ++static inline void ip_set_len(struct ip *ip, unsigned short len)
> + {
> +       ip->ip_len = htons(len);
> + }
> +diff --git a/src/os-netbsd.h b/src/os-netbsd.h
> +index 17bd5fa..22f74e5 100644
> +--- a/src/os-netbsd.h
> ++++ b/src/os-netbsd.h
> +@@ -8,12 +8,12 @@
> + #define IGMP_V2_MEMBERSHIP_REPORT IGMP_v2_HOST_MEMBERSHIP_REPORT
> + #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
> +
> +-static inline u_short ip_data_len(const struct ip *ip)
> ++static inline unsigned short ip_data_len(const struct ip *ip)
> + {
> +       return ip->ip_len;
> + }
> +
> +-static inline void ip_set_len(struct ip *ip, u_short len)
> ++static inline void ip_set_len(struct ip *ip, unsigned short len)
> + {
> +       ip->ip_len = len;
> + }
> +diff --git a/src/os-openbsd.h b/src/os-openbsd.h
> +index 873e5fb..75ddf80 100644
> +--- a/src/os-openbsd.h
> ++++ b/src/os-openbsd.h
> +@@ -10,12 +10,12 @@
> +
> + #define INADDR_ALLRTRS_GROUP INADDR_ALLROUTERS_GROUP
> +
> +-static inline u_short ip_data_len(const struct ip *ip)
> ++static inline unsigned short ip_data_len(const struct ip *ip)
> + {
> +       return ntohs(ip->ip_len) - (ip->ip_hl << 2);
> + }
> +
> +-static inline void ip_set_len(struct ip *ip, u_short len)
> ++static inline void ip_set_len(struct ip *ip, unsigned short len)
> + {
> +       ip->ip_len = htons(len);
> + }
> +--
> +1.9.0
> +
> --
> 2.7.0.rc3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
  2016-05-18 16:33   ` Matthew Weber
@ 2016-05-19  3:47     ` Matthew Weber
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Weber @ 2016-05-19  3:47 UTC (permalink / raw)
  To: buildroot

Thomas,

On Wed, May 18, 2016 at 11:33 AM, Matthew Weber <
matthew.weber@rockwellcollins.com> wrote:

> All,
>
> On May 17, 2016 3:32 PM, "Thomas Petazzoni" <
> thomas.petazzoni at free-electrons.com> wrote:
> >
> > Hello,
> >
> > On Sun, 15 May 2016 16:41:11 -0500, Matt Weber wrote:
> >
> > > diff --git
> a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> > > new file mode 100644
> > > index 0000000..200bf23
> > > --- /dev/null
> > > +++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> > > @@ -0,0 +1,213 @@
> > > +Fix musl build
> > > +
> > > +Downloaded from:
> > > +
> https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
> > > +
> > > +Patch was reported upstream:
> > > +http://sourceforge.net/p/igmpproxy/bugs/22/
> > > +
> > > +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> >
> > This should be below the commit log of the original patch, and the "Fix
> > musl build" is not good. We don't care about "Fixing the musl build",
> > we want to make the source code better, which has the consequence of
> > fixing the musl build. So the original patch title "Use standard
> > unsigned integer types" is good.
>
> Noted.
>
> >
> > > +From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
> > > +From: Natanael Copa <ncopa@alpinelinux.org>
> > > +Date: Mon, 3 Mar 2014 12:11:26 +0000
> > > +Subject: [PATCH] Use standard unsigned integer types
> > > +
> > > +Use the stanard unsigned integer types instead of the non-standard
> > > +u_char, u_short and u_int.
> > > +
> > > +This fixes build with musl libc.
> > > +
> > > +(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
> >
> > From where is this commit b914bcf882c6189be7a0ce6fceb34422372c3606
> > coming? Upstream seems to be https://github.com/pali/igmpproxy, and I
> > don't see any commit identified as
> > b914bcf882c6189be7a0ce6fceb34422372c3606.
>
> Sorry, bad assumption on my part about the original patch's origin being
> good.  I'll open an upstream issue and work  on getting it merged or at
> minimum something we can reference correctly.
>
>
So if looks like b914bc,,,,, is the hash of the patch posted with the
sourceforge issue ticket.  There isn't a repository with the change that I
could find.
https://sourceforge.net/p/igmpproxy/bugs/22/attachment/0001-Use-standard-unsigned-integer-types.patch

I'll update this comment to mention that the patch was based on the patch
attached to the sourceforge issue ticket.

-- Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160518/bd3e7d65/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
  2016-05-17 20:31 ` Thomas Petazzoni
@ 2016-05-18 16:33   ` Matthew Weber
  2016-05-19  3:47     ` Matthew Weber
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Weber @ 2016-05-18 16:33 UTC (permalink / raw)
  To: buildroot

All,

On May 17, 2016 3:32 PM, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:
>
> Hello,
>
> On Sun, 15 May 2016 16:41:11 -0500, Matt Weber wrote:
>
> > diff --git
a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> > new file mode 100644
> > index 0000000..200bf23
> > --- /dev/null
> > +++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> > @@ -0,0 +1,213 @@
> > +Fix musl build
> > +
> > +Downloaded from:
> > +
https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
> > +
> > +Patch was reported upstream:
> > +http://sourceforge.net/p/igmpproxy/bugs/22/
> > +
> > +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
>
> This should be below the commit log of the original patch, and the "Fix
> musl build" is not good. We don't care about "Fixing the musl build",
> we want to make the source code better, which has the consequence of
> fixing the musl build. So the original patch title "Use standard
> unsigned integer types" is good.

Noted.

>
> > +From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
> > +From: Natanael Copa <ncopa@alpinelinux.org>
> > +Date: Mon, 3 Mar 2014 12:11:26 +0000
> > +Subject: [PATCH] Use standard unsigned integer types
> > +
> > +Use the stanard unsigned integer types instead of the non-standard
> > +u_char, u_short and u_int.
> > +
> > +This fixes build with musl libc.
> > +
> > +(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
>
> From where is this commit b914bcf882c6189be7a0ce6fceb34422372c3606
> coming? Upstream seems to be https://github.com/pali/igmpproxy, and I
> don't see any commit identified as
> b914bcf882c6189be7a0ce6fceb34422372c3606.

Sorry, bad assumption on my part about the original patch's origin being
good.  I'll open an upstream issue and work  on getting it merged or at
minimum something we can reference correctly.

Thanks
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160518/c631dbe5/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
  2016-05-15 21:41 Matt Weber
@ 2016-05-17 20:31 ` Thomas Petazzoni
  2016-05-18 16:33   ` Matthew Weber
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-05-17 20:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 15 May 2016 16:41:11 -0500, Matt Weber wrote:

> diff --git a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> new file mode 100644
> index 0000000..200bf23
> --- /dev/null
> +++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
> @@ -0,0 +1,213 @@
> +Fix musl build
> +
> +Downloaded from:
> +https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
> +
> +Patch was reported upstream:
> +http://sourceforge.net/p/igmpproxy/bugs/22/
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

This should be below the commit log of the original patch, and the "Fix
musl build" is not good. We don't care about "Fixing the musl build",
we want to make the source code better, which has the consequence of
fixing the musl build. So the original patch title "Use standard
unsigned integer types" is good.

> +From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
> +From: Natanael Copa <ncopa@alpinelinux.org>
> +Date: Mon, 3 Mar 2014 12:11:26 +0000
> +Subject: [PATCH] Use standard unsigned integer types
> +
> +Use the stanard unsigned integer types instead of the non-standard
> +u_char, u_short and u_int.
> +
> +This fixes build with musl libc.
> +
> +(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)

From where is this commit b914bcf882c6189be7a0ce6fceb34422372c3606
coming? Upstream seems to be https://github.com/pali/igmpproxy, and I
don't see any commit identified as
b914bcf882c6189be7a0ce6fceb34422372c3606.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build
@ 2016-05-15 21:41 Matt Weber
  2016-05-17 20:31 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Weber @ 2016-05-15 21:41 UTC (permalink / raw)
  To: buildroot

From: Bernd Kuhls <bernd.kuhls@t-online.de>

Fixes
http://autobuild.buildroot.net/results/c6a/c6a6eec34cffb2c7876595b36fb8a01f475583f9/
http://autobuild.buildroot.net/results/943/9432748bf7b1e24db9fcb0a8cce6942fcdf6be5b/
http://autobuild.buildroot.net/results/083/083c61f43c2f1f0dec69d44583b447a0520933b7/
and many others

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Matt Weber <matt@thewebers.ws>
---
 .../0002-Use-standard-unsigned-integer-types.patch | 213 +++++++++++++++++++++
 1 file changed, 213 insertions(+)
 create mode 100644 package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch

diff --git a/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
new file mode 100644
index 0000000..200bf23
--- /dev/null
+++ b/package/igmpproxy/0002-Use-standard-unsigned-integer-types.patch
@@ -0,0 +1,213 @@
+Fix musl build
+
+Downloaded from:
+https://github.com/alpinelinux/aports/blob/master/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
+
+Patch was reported upstream:
+http://sourceforge.net/p/igmpproxy/bugs/22/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+
+From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 3 Mar 2014 12:11:26 +0000
+Subject: [PATCH] Use standard unsigned integer types
+
+Use the stanard unsigned integer types instead of the non-standard
+u_char, u_short and u_int.
+
+This fixes build with musl libc.
+
+(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
+
+Conflicts:
+	src/igmp.c
+---
+ src/igmp.c         |  4 ++--
+ src/kern.c         |  4 ++--
+ src/lib.c          | 10 +++++-----
+ src/os-dragonfly.h |  4 ++--
+ src/os-freebsd.h   |  4 ++--
+ src/os-linux.h     |  4 ++--
+ src/os-netbsd.h    |  4 ++--
+ src/os-openbsd.h   |  4 ++--
+ 8 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/src/igmp.c b/src/igmp.c
+index a0cd27d..92f37e7 100644
+--- a/src/igmp.c
++++ b/src/igmp.c
+@@ -79,7 +79,7 @@ void initIgmp() {
+ /**
+ *   Finds the textual name of the supplied IGMP request.
+ */
+-char *igmpPacketKind(u_int type, u_int code) {
++char *igmpPacketKind(unsigned int type, unsigned int code) {
+     static char unknown[20];
+ 
+     switch (type) {
+@@ -226,7 +226,7 @@ void buildIgmp(uint32_t src, uint32_t dst, int type, int code, uint32_t group, i
+     igmp->igmp_code         = code;
+     igmp->igmp_group.s_addr = group;
+     igmp->igmp_cksum        = 0;
+-    igmp->igmp_cksum        = inetChksum((u_short *)igmp,
++    igmp->igmp_cksum        = inetChksum((unsigned short *)igmp,
+                                          IGMP_MINLEN + datalen);
+ }
+ 
+diff --git a/src/kern.c b/src/kern.c
+index 2055636..12c613f 100644
+--- a/src/kern.c
++++ b/src/kern.c
+@@ -82,7 +82,7 @@ void k_hdr_include(int hdrincl) {
+ 
+ void k_set_ttl(int t) {
+ #ifndef RAW_OUTPUT_IS_RAW
+-    u_char ttl;
++    unsigned char ttl;
+ 
+     ttl = t;
+     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_TTL,
+@@ -94,7 +94,7 @@ void k_set_ttl(int t) {
+ 
+ 
+ void k_set_loop(int l) {
+-    u_char loop;
++    unsigned char loop;
+ 
+     loop = l;
+     if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_LOOP,
+diff --git a/src/lib.c b/src/lib.c
+index 70a730a..0eed9ce 100644
+--- a/src/lib.c
++++ b/src/lib.c
+@@ -61,9 +61,9 @@ char *fmtInAdr( char *St, struct in_addr InAdr ) {
+  * Convert an IP address in u_long (network) format into a printable string.
+  */
+ char *inetFmt(uint32_t addr, char *s) {
+-    register u_char *a;
++    register unsigned char *a;
+ 
+-    a = (u_char *)&addr;
++    a = (unsigned char *)&addr;
+     sprintf(s, "%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
+     return(s);
+ }
+@@ -74,15 +74,15 @@ char *inetFmt(uint32_t addr, char *s) {
+  * string including the netmask as a number of bits.
+  */
+ char *inetFmts(uint32_t addr, uint32_t mask, char *s) {
+-    register u_char *a, *m;
++    register unsigned char *a, *m;
+     int bits;
+ 
+     if ((addr == 0) && (mask == 0)) {
+         sprintf(s, "default");
+         return(s);
+     }
+-    a = (u_char *)&addr;
+-    m = (u_char *)&mask;
++    a = (unsigned char *)&addr;
++    m = (unsigned char *)&mask;
+     bits = 33 - ffs(ntohl(mask));
+ 
+     if (m[3] != 0) sprintf(s, "%u.%u.%u.%u/%d", a[0], a[1], a[2], a[3],
+diff --git a/src/os-dragonfly.h b/src/os-dragonfly.h
+index 735401c..189dfb2 100644
+--- a/src/os-dragonfly.h
++++ b/src/os-dragonfly.h
+@@ -3,12 +3,12 @@
+ #include <netinet/ip.h>
+ #include <netinet/igmp.h>
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-freebsd.h b/src/os-freebsd.h
+index ca01cc5..60b897c 100644
+--- a/src/os-freebsd.h
++++ b/src/os-freebsd.h
+@@ -12,12 +12,12 @@
+ #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
+ #endif
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-linux.h b/src/os-linux.h
+index 7504b1f..6cdcdc7 100644
+--- a/src/os-linux.h
++++ b/src/os-linux.h
+@@ -4,12 +4,12 @@
+ #include <netinet/ip.h>
+ #include <netinet/igmp.h>
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ntohs(ip->ip_len) - (ip->ip_hl << 2);
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = htons(len);
+ }
+diff --git a/src/os-netbsd.h b/src/os-netbsd.h
+index 17bd5fa..22f74e5 100644
+--- a/src/os-netbsd.h
++++ b/src/os-netbsd.h
+@@ -8,12 +8,12 @@
+ #define IGMP_V2_MEMBERSHIP_REPORT IGMP_v2_HOST_MEMBERSHIP_REPORT
+ #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ip->ip_len;
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = len;
+ }
+diff --git a/src/os-openbsd.h b/src/os-openbsd.h
+index 873e5fb..75ddf80 100644
+--- a/src/os-openbsd.h
++++ b/src/os-openbsd.h
+@@ -10,12 +10,12 @@
+ 
+ #define INADDR_ALLRTRS_GROUP INADDR_ALLROUTERS_GROUP
+ 
+-static inline u_short ip_data_len(const struct ip *ip)
++static inline unsigned short ip_data_len(const struct ip *ip)
+ {
+ 	return ntohs(ip->ip_len) - (ip->ip_hl << 2);
+ }
+ 
+-static inline void ip_set_len(struct ip *ip, u_short len)
++static inline void ip_set_len(struct ip *ip, unsigned short len)
+ {
+ 	ip->ip_len = htons(len);
+ }
+-- 
+1.9.0
+
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-19  3:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 21:27 [Buildroot] [PATCH 1/1] package/igmpproxy: fix musl build Bernd Kuhls
2016-05-15 13:45 ` Matthew Weber
2016-05-15 21:41 Matt Weber
2016-05-17 20:31 ` Thomas Petazzoni
2016-05-18 16:33   ` Matthew Weber
2016-05-19  3:47     ` Matthew Weber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.