linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ran Rozenstein <ranro@mellanox.com>
To: Deepa Dinamani <deepa.kernel@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"y2038@lists.linaro.org" <y2038@lists.linaro.org>,
	"chris@zankel.net" <chris@zankel.net>,
	"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
	"rth@twiddle.net" <rth@twiddle.net>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"ubraun@linux.ibm.com" <ubraun@linux.ibm.com>,
	"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-xtensa@linux-xtensa.org" <linux-xtensa@linux-xtensa.org>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>
Subject: RE: [PATCH net-next v5 09/12] socket: Add SO_TIMESTAMPING_NEW
Date: Sun, 10 Feb 2019 15:43:16 +0000	[thread overview]
Message-ID: <AM4PR0501MB2769C4BE6CF1C5B051068D0BC56B0@AM4PR0501MB2769.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20190202153454.7121-10-deepa.kernel@gmail.com>

> Subject: [PATCH net-next v5 09/12] socket: Add SO_TIMESTAMPING_NEW
> 
> Add SO_TIMESTAMPING_NEW variant of socket timestamp options.
> This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all
> architectures.
> 
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> Acked-by: Willem de Bruijn <willemb@google.com>


Hi,

I have app that include: 
	#include <linux/errqueue.h>

It now fail with this error:
	In file included from timestamping.c:6:0:
	/usr/include/linux/errqueue.h:46:27: error: array type has incomplete element type 'struct __kernel_timespec'
	  struct __kernel_timespec ts[3];
                			           ^~
I tried to do the trivial fix, to include time.h:
In include/uapi/linux/errqueue.h
	#include <linux/time.h>
	#include <linux/types.h>

But it just add some other noises:
                In file included from /usr/include/linux/errqueue.h:5:0,
                                 from timestamping.c:6:
                /usr/include/linux/time.h:10:8: error: redefinition of ?struct timespec?
                 struct timespec {
                        ^~~~~~~~
                In file included from /usr/include/sys/select.h:39:0,
                                 from /usr/include/sys/types.h:197,
                                 from /usr/include/stdlib.h:279,
                                 from timestamping.c:2:
                /usr/include/bits/types/struct_timespec.h:8:8: note: originally defined here
                 struct timespec
                        ^~~~~~~~
                In file included from /usr/include/linux/errqueue.h:5:0,
                                 from timestamping.c:6:
                /usr/include/linux/time.h:16:8: error: redefinition of ?struct timeval?
                 struct timeval {
                        ^~~~~~~
                In file included from /usr/include/sys/select.h:37:0,
                                 from /usr/include/sys/types.h:197,
                                 from /usr/include/stdlib.h:279,
                                 from timestamping.c:2:
                /usr/include/bits/types/struct_timeval.h:8:8: note: originally defined here
                 struct timeval
                        ^~~~~~~


Can you please advise how to solve it?

Thanks,
Ran


> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
> index c0151200f7d1..d955b9e32288 100644
> --- a/include/uapi/linux/errqueue.h
> +++ b/include/uapi/linux/errqueue.h
> @@ -41,6 +41,10 @@ struct scm_timestamping {
>  	struct timespec ts[3];
>  };
> 
> +struct scm_timestamping64 {
> +	struct __kernel_timespec ts[3];
> +};
> +
>  /* The type of scm_timestamping, passed in sock_extended_err ee_info.
>   * This defines the type of ts[0]. For SCM_TSTAMP_SND only, if ts[0]
>   * is zero, then this is a hardware timestamp and recorded in ts[2].

  reply	other threads:[~2019-02-10 15:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 15:34 [PATCH net-next v5 00/12] net: y2038-safe socket timestamps Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 01/12] selftests: add missing include unistd Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 02/12] socket: move compat timeout handling into sock.c Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 03/12] arch: Use asm-generic/socket.h when possible Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 04/12] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 05/12] arch: sparc: Override struct __kernel_old_timeval Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 06/12] socket: Use old_timeval types for socket timestamps Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 07/12] socket: Add struct __kernel_sock_timeval Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 08/12] socket: Add SO_TIMESTAMP[NS]_NEW Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 09/12] socket: Add SO_TIMESTAMPING_NEW Deepa Dinamani
2019-02-10 15:43   ` Ran Rozenstein [this message]
2019-02-11  3:21     ` Deepa Dinamani
2019-02-12 19:08       ` Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 10/12] socket: Update timestamping Documentation Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes Deepa Dinamani
2019-02-06 11:58   ` Michael Ellerman
2019-02-02 15:34 ` [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW Deepa Dinamani
2019-02-02 17:15   ` Oliver Hartkopp
2019-02-03  2:47     ` Deepa Dinamani
2019-02-06 11:56   ` Michael Ellerman
2019-02-09  1:44     ` Deepa Dinamani
2019-02-10 22:12       ` Michael Ellerman

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=AM4PR0501MB2769C4BE6CF1C5B051068D0BC56B0@AM4PR0501MB2769.eurprd05.prod.outlook.com \
    --to=ranro@mellanox.com \
    --cc=arnd@arndb.de \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=deepa.kernel@gmail.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=netdev@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=ubraun@linux.ibm.com \
    --cc=y2038@lists.linaro.org \
    /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).