From: Brendan Heading <brendanheading@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue
Date: Tue, 1 Sep 2015 13:39:02 +0100 [thread overview]
Message-ID: <1441111142-8561-1-git-send-email-brendanheading@gmail.com> (raw)
Fixes:
http://autobuild.buildroot.net/results/1b6cb1b40431bf484db2d99bfdc8237cbae6a9d7/
http://autobuild.buildroot.net/results/20e669d6e4bc3d872a355ef658ddad8f34676624/
Include a more appropriate header file to pick up the definition of HZ
from the kernel headers.
Signed-off-by: Brendan Heading <brendanheading@gmail.com>
---
v1 - This looks a bit hacky, but it seems to compile fine against
the uclibc, glibc and musl toolchain combos without any other packages
enabled. Comments welcome.
---
package/dhrystone/0002-HZ.patch | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/dhrystone/0002-HZ.patch b/package/dhrystone/0002-HZ.patch
index e3b8a0e..9572b59 100644
--- a/package/dhrystone/0002-HZ.patch
+++ b/package/dhrystone/0002-HZ.patch
@@ -2,6 +2,11 @@ Get HZ value from system rather than requiring via CPPFLAGS
Patch by Robin Getz <rgetz@blackfin.uclinux.org>
+Tweaked by Brendan Heading <brendanheading@gmail.com> - musl
+doesn't define HZ within sys/param.h (and strictly speaking
+it's not wise to depend on the glibc def either). Changed it
+here to grab the kernel version.
+
--- a/dhry.h
+++ b/dhry.h
@@ -359,6 +359,10 @@
@@ -9,7 +14,7 @@ Patch by Robin Getz <rgetz@blackfin.uclinux.org>
#endif
+#ifndef HZ
-+#include <sys/param.h>
++#include <linux/param.h>
+#endif
+
#define Mic_secs_Per_Second 1000000.0
--
2.4.3
next reply other threads:[~2015-09-01 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 12:39 Brendan Heading [this message]
2015-09-13 21:13 ` [Buildroot] [PATCH 1/1] package/dhrystone: fix musl compilation issue Peter Korsgaard
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=1441111142-8561-1-git-send-email-brendanheading@gmail.com \
--to=brendanheading@gmail.com \
--cc=buildroot@busybox.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox