[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170919.103840.379059301652331060.davem@davemloft.net>
Date: Tue, 19 Sep 2017 10:38:40 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: stefanha@...hat.com
Cc: netdev@...r.kernel.org, jhansen@...are.com
Subject: Re: [PATCH] VSOCK: fix uapi/linux/vm_sockets.h incomplete types
From: Stefan Hajnoczi <stefanha@...hat.com>
Date: Mon, 18 Sep 2017 16:21:00 +0100
> On Fri, Sep 15, 2017 at 02:14:32PM -0700, David Miller wrote:
>> > diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h
>> > index b4ed5d895699..4ae5c625ac56 100644
>> > --- a/include/uapi/linux/vm_sockets.h
>> > +++ b/include/uapi/linux/vm_sockets.h
>> > @@ -18,6 +18,10 @@
>> >
>> > #include <linux/socket.h>
>> >
>> > +#ifndef __KERNEL__
>> > +#include <sys/socket.h> /* struct sockaddr */
>> > +#endif
>> > +
>>
>> There is no precedence whatsoever to include sys/socket.h in _any_ UAPI
>> header file provided by the kernel.
>
> <linux/if.h> does it for the same reason:
>
> include/uapi/linux/if.h:#include <sys/socket.h> /* for struct sockaddr. */
You don't need it for struct sockaddr, you need it for sa_family_t,
the comment is very misleading.
Please do as I have instructed and it will fix this problem.
Thank you.
Powered by blists - more mailing lists