All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] aiccu: musl patches
@ 2015-03-24 22:30 Alex Suykov
  2015-03-25 19:09 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Suykov @ 2015-03-24 22:30 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/8c666ef11310868097601b6de1dd25779729b878/

if_ether.h issue discussion: http://www.openwall.com/lists/musl/2012/10/11/1

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
 package/aiccu/0004-if-ether-header.patch | 23 +++++++++++++++++++++++
 package/aiccu/0005-res-ninit.patch       | 22 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 package/aiccu/0004-if-ether-header.patch
 create mode 100644 package/aiccu/0005-res-ninit.patch

diff --git a/package/aiccu/0004-if-ether-header.patch b/package/aiccu/0004-if-ether-header.patch
new file mode 100644
index 0000000..e0ecd74
--- /dev/null
+++ b/package/aiccu/0004-if-ether-header.patch
@@ -0,0 +1,23 @@
+musl does not allow using <netinet/*> together with <linux/*> headers.
+Since there are both netinet/if_ether.h and linux/if_ether.h providing
+the same definitions, use linux/if_ether.h whenever other linux/*
+headers are included.
+
+Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
+
+--- aiccu/common/common.h
++++ aiccu/common/common.h
+@@ -91,11 +91,12 @@
+ 	#include <sys/select.h>
+ 
+ 	#include <net/if.h>
+-	#include <netinet/if_ether.h>
+ #ifdef linux
+ 	#include <netpacket/packet.h>
++	#include <linux/if_ether.h>
+ 	#include <linux/if_tun.h>
+ #else
++	#include <netinet/if_ether.h>
+ #ifdef _DFBSD
+ 	#include <net/tun/if_tun.h>
+ #else
diff --git a/package/aiccu/0005-res-ninit.patch b/package/aiccu/0005-res-ninit.patch
new file mode 100644
index 0000000..f25b53b
--- /dev/null
+++ b/package/aiccu/0005-res-ninit.patch
@@ -0,0 +1,22 @@
+With _LINUX defined, getrrs uses res_ninit instead of res_init.
+
+Musl does not provide res_ninit.
+
+Since getrrs is only called from a single location before any threads
+are spawned, it is actually safe to use res_init here.
+
+Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
+
+--- aiccu/common/resolver.c
++++ aiccu/common/resolver.c
+@@ -24,6 +24,10 @@
+ #include <resolv.h>
+ #include <netdb.h>
+ 
++#ifdef _LINUX
++#undef _LINUX
++#endif
++
+ int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
+ {
+ #ifdef _LINUX
-- 
2.0.3

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

* [Buildroot] [PATCH] aiccu: musl patches
  2015-03-24 22:30 [Buildroot] [PATCH] aiccu: musl patches Alex Suykov
@ 2015-03-25 19:09 ` Thomas Petazzoni
  2015-03-25 21:26   ` Alex Suykov
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-03-25 19:09 UTC (permalink / raw)
  To: buildroot

Dear Alex Suykov,

On Wed, 25 Mar 2015 00:30:49 +0200, Alex Suykov wrote:
> Fixes
> http://autobuild.buildroot.net/results/8c666ef11310868097601b6de1dd25779729b878/
> 
> if_ether.h issue discussion: http://www.openwall.com/lists/musl/2012/10/11/1
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
> ---
>  package/aiccu/0004-if-ether-header.patch | 23 +++++++++++++++++++++++
>  package/aiccu/0005-res-ninit.patch       | 22 ++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>  create mode 100644 package/aiccu/0004-if-ether-header.patch
>  create mode 100644 package/aiccu/0005-res-ninit.patch

Thanks. What is the upstreaming plan for those patches?

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

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

* [Buildroot] [PATCH] aiccu: musl patches
  2015-03-25 19:09 ` Thomas Petazzoni
@ 2015-03-25 21:26   ` Alex Suykov
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Suykov @ 2015-03-25 21:26 UTC (permalink / raw)
  To: buildroot

Wed, Mar 25, 2015 at 08:09:55PM +0100, Thomas Petazzoni wrote:

> >  package/aiccu/0004-if-ether-header.patch | 23 +++++++++++++++++++++++
> >  package/aiccu/0005-res-ninit.patch       | 22 ++++++++++++++++++++++
> 
> Thanks. What is the upstreaming plan for those patches?

None I'd say, their last release is 8 years old and patches 0001-0003
have been around for quite some time as well.

By the way, please disregard this patch. I just realized 0001 does
exactly the same thing for uclibc that I did with 0005 for musl.
It's better to merge them.

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

end of thread, other threads:[~2015-03-25 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 22:30 [Buildroot] [PATCH] aiccu: musl patches Alex Suykov
2015-03-25 19:09 ` Thomas Petazzoni
2015-03-25 21:26   ` Alex Suykov

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.