mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] nameser.h: explicitely include endian.h
@ 2017-12-04 10:55 Jo-Philipp Wich
  0 siblings, 0 replies; 6+ messages in thread
From: Jo-Philipp Wich @ 2017-12-04 10:55 UTC (permalink / raw)
  To: musl; +Cc: Jo-Philipp Wich

As nameser.h itself uses endian macros to declare the proper layout of
the HEADER structure, it needs to include the endian.h header as well.

The issue was found while investigating iodine query packet corruption
on little endian musl systems [1].

1: http://lists.infradead.org/pipermail/lede-dev/2017-November/010085.html

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
---
 include/arpa/nameser.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 581925a4..b315e0f3 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -7,6 +7,7 @@ extern "C" {
 
 #include <stddef.h>
 #include <stdint.h>
+#include <endian.h>
 
 #define __NAMESER	19991006
 #define NS_PACKETSZ	512
-- 
2.11.0



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] nameser.h: explicitely include endian.h
@ 2017-12-04 11:13 Jo-Philipp Wich
  2017-12-15  4:38 ` Rich Felker
  0 siblings, 1 reply; 6+ messages in thread
From: Jo-Philipp Wich @ 2017-12-04 11:13 UTC (permalink / raw)
  To: musl; +Cc: Jo-Philipp Wich

As nameser.h itself uses endian macros to declare the proper layout of
the HEADER structure, it needs to include the endian.h header as well.

The issue was found while investigating iodine query packet corruption
on little endian musl systems [1].

1: http://lists.infradead.org/pipermail/lede-dev/2017-November/010085.html

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
---
 include/arpa/nameser.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 581925a4..b315e0f3 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -7,6 +7,7 @@ extern "C" {
 
 #include <stddef.h>
 #include <stdint.h>
+#include <endian.h>
 
 #define __NAMESER	19991006
 #define NS_PACKETSZ	512
-- 
2.11.0



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

end of thread, other threads:[~2017-12-15 18:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 10:55 [PATCH] nameser.h: explicitely include endian.h Jo-Philipp Wich
2017-12-04 11:13 Jo-Philipp Wich
2017-12-15  4:38 ` Rich Felker
2017-12-15 17:54   ` Bartosz Brachaczek
2017-12-15 17:57     ` Rich Felker
2017-12-15 18:53       ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).