lkml.org 
[lkml]   [2016]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets
From
Date
On 10/13/16 1:16 AM, Cyrill Gorcunov wrote:
> On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote:
>> From: Cyrill Gorcunov <gorcunov@gmail.com>
>> Date: Wed, 12 Oct 2016 09:53:29 +0300
>>
>>> I can't rename the field, neither a can use union.
>>
>> Remind me again what is wrong with using an anonymous union?
>
> Anon union would be a preferred but Eric pointed me that even
> though it might cause problems (https://patchwork.kernel.org/patch/9353365/)
>
> | Note that some programs could fail to compile with the added union
> | anyway.
> |
> | Some gcc versions are unable to compile a static init with an union
> |
> | struct inet_diag_req_v2 foo = { .pad = 0, sdiag_family = AF_INET, };
> |
> | When I cooked my recent fq commit I simply removed a pad and replaced
> | it :
> |
> | git show fefa569a9d4bc4 -- include
>

That commit suggests it is acceptable to just rename the pad field, which is the simplest approach.

\
 
 \ /
  Last update: 2016-10-13 17:44    [W:0.155 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site