From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbcI0EXh convert rfc822-to-8bit (ORCPT ); Tue, 27 Sep 2016 00:23:37 -0400 Received: from ozlabs.org ([103.22.144.67]:58799 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbcI0EXa (ORCPT ); Tue, 27 Sep 2016 00:23:30 -0400 From: Michael Ellerman To: Emilio =?utf-8?Q?L=C3=B3pez?= Cc: shuah@kernel.org, devel@driverdev.osuosl.org, gustavo.padovan@collabora.co.uk, riandrews@android.com, daniel.vetter@ffwll.ch, John.C.Harrison@Intel.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, ghackmann@google.com, robdclark@gmail.com, linux-kselftest@vger.kernel.org, maarten.lankhorst@linux.intel.com, daniels@collabora.com, arve@android.com, emil.l.velikov@gmail.com Subject: Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework In-Reply-To: <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk> References: <20160921211205.22657-1-emilio.lopez@collabora.co.uk> <20160921211205.22657-2-emilio.lopez@collabora.co.uk> <87fuos8e25.fsf@concordia.ellerman.id.au> <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Tue, 27 Sep 2016 14:23:25 +1000 Message-ID: <87ponq6kea.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Emilio López writes: > El 22/09/16 a las 06:43, Michael Ellerman escribió: >> Emilio López writes: >> >> Please don't include the *kernel* headers, they're really not meant to >> be used in userspace programs :) >> >>> +CFLAGS += -I../../../../usr/include/ >> >> That is the correct place to get them from. They'll have been put there >> by 'make headers_install'. > > My inspiration here has been tools/testing/selftests/memfd/Makefile, > which does it this way. If I only include the ones on usr then it > doesn't build, as there's no sync_file.h available, even after running > make headers_install. How am I supposed to use the ioctls from there? It looks like it's missing from include/uapi/linux/Kbuild, you need to add it to the list of exported headers: diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index dd604395606b..40411b4ff012 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -397,6 +397,7 @@ header-y += stddef.h header-y += string.h header-y += suspend_ioctls.h header-y += swab.h +header-y += sync_file.h header-y += synclink.h header-y += sysctl.h header-y += sysinfo.h cheers