All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemb@google.com>
To: Brooks Moses <bmoses@google.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Ian Kasprzak <iankaz@google.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: Missing include file in include/uapi/linux/errqueue.h?
Date: Sun, 10 Jul 2016 09:56:20 -0400	[thread overview]
Message-ID: <CA+FuTSf799gHFAkBXH+UcOdMjM95+96ET7Ed448jgayUJACSSg@mail.gmail.com> (raw)
In-Reply-To: <CAOxa4Kpmg=S9SKc2s0MMD3jSpsQcq3s53263sOgE4KE=e496Sg@mail.gmail.com>

On Sun, Jul 10, 2016 at 1:43 AM, Brooks Moses <bmoses@google.com> wrote:
> On Sat, Jul 9, 2016 at 10:36 AM, Brooks Moses <bmoses@google.com> wrote:
>> I've been attempting to qualify the Linux 4.5.2 user-space headers for
>> a toolchain release, and ran into what looks like a missing include
>> file in include/uapi/linux/errqueue.h.  In particular,
>> https://github.com/torvalds/linux/commit/f24b9be5957b38bb420b838115040dc2031b7d0c
>> adds the following to this file:
>>
>> +struct scm_timestamping {
>> + struct timespec ts[3];
>> +};
>>
>> However, struct timespec is defined in time.h, which isn't included
>> either in 4.5.2 or in current head.  Is this simply a missing #include
>> line,

It is. I missed that in my original patch.

> or am I misunderstanding something?
>
> As a followup: Unfortunately the obvious fix -- adding "#include
> <linux/time.h>" -- causes other problems, since linux/time.h is
> incompatible with the glibc time.h such that including both of them
> into the same compilation unit causes errors about redefined types.

If these conflicts between libc and uapi time.h can be resolved through
include/uapi/linux/libc-compat.h, then we can apply the obvious fix of
including linux/time.h in linux/errqueue.h.

> And we, at least, have some programs that want to include
> linux/errqueue.h and (glibc's) time.h.  The fix of adding "#include
> <time.h>" to linux/errqueue.h seems to work for us, but I'm not sure
> that won't cause problems in the other direction for other people.

That breaks kernel compilation.

  reply	other threads:[~2016-07-10 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09 17:36 Missing include file in include/uapi/linux/errqueue.h? Brooks Moses
2016-07-10  5:43 ` Brooks Moses
2016-07-10 13:56   ` Willem de Bruijn [this message]
2016-07-10 15:19     ` Willem de Bruijn

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=CA+FuTSf799gHFAkBXH+UcOdMjM95+96ET7Ed448jgayUJACSSg@mail.gmail.com \
    --to=willemb@google.com \
    --cc=bmoses@google.com \
    --cc=davem@davemloft.net \
    --cc=iankaz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.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.
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.