From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] libnfs: fix build of applications like mpd on musl
Date: Sun, 23 Sep 2018 16:52:22 +0200 [thread overview]
Message-ID: <20180923165222.74cb11bb@windsurf> (raw)
In-Reply-To: <20180922194305.27608-1-fontaine.fabrice@gmail.com>
Hello,
On Sat, 22 Sep 2018 21:43:05 +0200, Fabrice Fontaine wrote:
> + #include <stdint.h>
> +-#if defined(__ANDROID__) || defined(AROS) \
> ++#if defined(__ANDROID__) || defined(AROS) || defined(__linux__) \
> + || ( defined(__APPLE__) && defined(__MACH__) )
> + #include <sys/time.h>
> + #else
I think the proper fix would be to use the AC_HEADER_TIME macro
(https://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Headers).
First need to add:
AC_HEADER_TIME
AC_CHECK_HEADERS([sys/time.h])
And then in the code, do:
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
Instead of the mess that is currently done based on the system on which
the stuff is being compiled.
Could you try to do this, and upstream the corresponding patch ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-09-23 14:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-22 19:43 [Buildroot] [PATCH 1/1] libnfs: fix build of applications like mpd on musl Fabrice Fontaine
2018-09-23 14:52 ` Thomas Petazzoni [this message]
2018-09-23 16:24 ` Fabrice Fontaine
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=20180923165222.74cb11bb@windsurf \
--to=thomas.petazzoni@bootlin.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