From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbbCKA7j (ORCPT ); Tue, 10 Mar 2015 20:59:39 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:49465 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976AbbCKA7e (ORCPT ); Tue, 10 Mar 2015 20:59:34 -0400 Date: Wed, 11 Mar 2015 02:59:33 +0200 From: Mikko Rapeli To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace Message-ID: <20150311005933.GD12550@lakka.kapsi.fi> References: <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi> <1424127948-22484-38-git-send-email-mikko.rapeli@iki.fi> <3218094.36vl2gijCv@wuerfel> <20150311003815.GC12550@lakka.kapsi.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150311003815.GC12550@lakka.kapsi.fi> X-SA-Exim-Connect-IP: 2001:1bc8:1004::1 X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2015 at 02:38:15AM +0200, Mikko Rapeli wrote: > On Tue, Feb 17, 2015 at 10:14:10AM +0100, Arnd Bergmann wrote: > > On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote: > > > This libc header has sockaddr definition for userspace. > > > Fixes compilation errors like: > > > error: field ‘ifru_addr’ has incomplete type > > > struct sockaddr ifru_addr; > > > > > > Signed-off-by: Mikko Rapeli > > > --- > > > include/uapi/linux/socket.h | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > This looks wrong: where do you see a use of ifru_addr > > in uapi/linux/socket.h? > > Indeed, this one seems completely wrong. Based on the test logs the > change should have gone to linux/if.h. Hmm, turns out this was not so straight forward. If I drop this I get 20 more errors from headers which include linux/socket.h and expect sockaddr to be defined which is not true since it comes from sys/socket.h. One way to fix this for all linux/socket.h users is to include sys/socket.h already in linux/socket.h. After this I get rid of all compile test errors from missing sockaddr definitions except cases where headers fail to include even linux/socket.h. Other option would be to include sys/socket.h in all headers using sockaddr. I would prefer to include sys/socket.h already in linux/socket.h but I will improve the commit message with this detail. -Mikko