Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751429AbdHFU1e (ORCPT ); Sun, 6 Aug 2017 16:27:34 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33941 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbdHFU1b (ORCPT ); Sun, 6 Aug 2017 16:27:31 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170806164428.2273-1-mikko.rapeli@iki.fi> <20170806164428.2273-19-mikko.rapeli@iki.fi> From: Willem de Bruijn Date: Sun, 6 Aug 2017 16:26:50 -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: 1200 Lines: 37 On Sun, Aug 6, 2017 at 4:23 PM, Willem de Bruijn wrote: > On Sun, Aug 6, 2017 at 12:44 PM, Mikko Rapeli wrote: >> linux/time.h conflicts with user space header time.h. Try to be compatible >> with both. >> >> Fixes userspace compilation error: >> >> error: array type has incomplete element type >> struct timespec ts[3]; >> >> Signed-off-by: Mikko Rapeli >> Cc: Willem de Bruijn >> Cc: Soheil Hassas Yeganeh >> Cc: netdev@vger.kernel.org >> --- >> include/uapi/linux/errqueue.h | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h >> index 07bdce1f444a..b310b2c6d94f 100644 >> --- a/include/uapi/linux/errqueue.h >> +++ b/include/uapi/linux/errqueue.h >> @@ -3,6 +3,12 @@ >> >> #include >> >> +#ifdef __KERNEL__ >> +#include >> +#else >> +#include >> +#endif /* __KERNEL__ */ > > This will break applications that include manually. Also, the patch title reads "include in user space", but it includes in that environment.