Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdHFWEg (ORCPT ); Sun, 6 Aug 2017 18:04:36 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:38860 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbdHFWEd (ORCPT ); Sun, 6 Aug 2017 18:04:33 -0400 MIME-Version: 1.0 In-Reply-To: <20170806215244.GB31101@lakka.kapsi.fi> References: <20170806164428.2273-1-mikko.rapeli@iki.fi> <20170806164428.2273-19-mikko.rapeli@iki.fi> <20170806205654.GF28459@lakka.kapsi.fi> <20170806213330.GA31101@lakka.kapsi.fi> <20170806215244.GB31101@lakka.kapsi.fi> From: Willem de Bruijn Date: Sun, 6 Aug 2017 18:03:52 -0400 Message-ID: Subject: Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space To: Mikko Rapeli Cc: LKML , Linux API , Willem de Bruijn , Soheil Hassas Yeganeh , Network Development Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2052 Lines: 44 On Sun, Aug 6, 2017 at 5:52 PM, Mikko Rapeli wrote: > On Sun, Aug 06, 2017 at 05:42:13PM -0400, Willem de Bruijn wrote: >> On Sun, Aug 6, 2017 at 5:33 PM, Mikko Rapeli wrote: >> > On Sun, Aug 06, 2017 at 05:24:20PM -0400, Willem de Bruijn wrote: >> >> >> > +#ifdef __KERNEL__ >> >> >> > +#include >> >> >> > +#else >> >> >> > +#include >> >> >> > +#endif /* __KERNEL__ */ >> >> >> >> >> >> This will break applications that include manually. >> >> >> I previously sent a patch to use libc-compat to make compilation succeed >> >> >> when both are included in the case where is included after >> >> >> . >> >> >> >> >> >> https://lkml.org/lkml/2016/9/12/872 >> >> >> >> >> >> The inverse will require changes to the libc header to avoid redefining >> >> >> symbols already defined by >> >> >> >> >> >> The second patch in that 2-patch set included >> >> >> unconditionally after the fix. This broke builds that also included >> >> >> in the wrong order. I did not resubmit the first patch as a >> >> >> stand-alone, as it is not sufficient to avoid breakage. >> >> > >> >> > I wasn't aware of your change, but I was about to send this to fix the >> >> > case when glibc is included before : >> >> > >> >> > https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66 >> >> >> >> There are a few differences between the two. Including does not >> >> unconditionally define all the symbols. Some are conditional on additional >> >> state, such as __timespec_defined. >> > >> > Yep, your patch seems better for libc-compat.h. Could you send it again? >> >> Okay. Or feel free to include it in the patchset if that helps resolve >> dependencies. > > If you don't have the time, I will send tomorrow a new version of this > patch which fixes the commit topic and before that your libc-compat.h change > so both could be applied together. Please do. Thanks!