mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jo-Philipp Wich <jo@mein.io>
To: musl@lists.openwall.com
Cc: Jo-Philipp Wich <jo@mein.io>
Subject: [PATCH] nameser.h: explicitely include endian.h
Date: Mon,  4 Dec 2017 11:55:48 +0100	[thread overview]
Message-ID: <20171204105548.2576-1-jo@mein.io> (raw)

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



             reply	other threads:[~2017-12-04 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 10:55 Jo-Philipp Wich [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171204105548.2576-1-jo@mein.io \
    --to=jo@mein.io \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).