netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
	john.stultz@linaro.rg, bmoses@google.com,
	Willem de Bruijn <willemb@google.com>
Subject: [PATCH net-next 2/2] errqueue: include linux/time.h
Date: Mon, 12 Sep 2016 13:05:30 -0400	[thread overview]
Message-ID: <1473699930-58865-3-git-send-email-willemdebruijn.kernel@gmail.com> (raw)
In-Reply-To: <1473699930-58865-1-git-send-email-willemdebruijn.kernel@gmail.com>

From: Willem de Bruijn <willemb@google.com>

struct scm_timestamping has fields of type struct timespec. Now that
it is safe to include linux/time.h and time.h at the same time,
include linux/time.h directly in linux/errqueue.h

Without this patch, when compiling the following program after
make headers_install:

gcc -Wall -Werror -Iusr/include -c -xc - <<EOF
  #include <linux/errqueue.h>
  static struct scm_timestamping tss;
  int main(void) { tss.ts[0].tv_sec = 1; return 0; }
EOF

gcc gives this error:

  In file included from <stdin>:1:0:
  usr/include/linux/errqueue.h:33:18: error: array type has incomplete element type
    struct timespec ts[3];

Reported-by: Brooks Moses <bmoses@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 include/uapi/linux/errqueue.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
index 07bdce1..abafec8 100644
--- a/include/uapi/linux/errqueue.h
+++ b/include/uapi/linux/errqueue.h
@@ -1,6 +1,7 @@
 #ifndef _UAPI_LINUX_ERRQUEUE_H
 #define _UAPI_LINUX_ERRQUEUE_H
 
+#include <linux/time.h>
 #include <linux/types.h>
 
 struct sock_extended_err {
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-09-12 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 17:05 [PATCH net-next 0/2] uapi: include time.h from errqueue.h Willem de Bruijn
2016-09-12 17:05 ` [PATCH net-next 1/2] uapi glibc compat: make linux/time.h compile with user time.h files Willem de Bruijn
2016-09-12 17:05 ` Willem de Bruijn [this message]
2016-09-12 19:26   ` [PATCH net-next 2/2] errqueue: include linux/time.h kbuild test robot
2016-09-12 20:09     ` 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=1473699930-58865-3-git-send-email-willemdebruijn.kernel@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=bmoses@google.com \
    --cc=davem@davemloft.net \
    --cc=john.stultz@linaro.rg \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.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 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).