Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491676 > unrolled thread
| Started by | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| First post | 2016-09-27 06:30 +0200 |
| Last post | 2016-10-05 04:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework Michael Ellerman <mpe@ellerman.id.au> - 2016-09-27 06:30 +0200
Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework Emilio López <emilio.lopez@collabora.co.uk> - 2016-09-27 17:00 +0200
Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework Michael Ellerman <mpe@ellerman.id.au> - 2016-10-05 04:30 +0200
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-09-27 06:30 +0200 |
| Subject | Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework |
| Message-ID | <slSbL-4TA-1@gated-at.bofh.it> |
Emilio López <emilio.lopez@collabora.co.uk> writes: > El 22/09/16 a las 06:43, Michael Ellerman escribió: >> Emilio López <emilio.lopez@collabora.co.uk> 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
[toc] | [next] | [standalone]
| From | Emilio López <emilio.lopez@collabora.co.uk> |
|---|---|
| Date | 2016-09-27 17:00 +0200 |
| Message-ID | <sm21s-2jb-15@gated-at.bofh.it> |
| In reply to | #1491676 |
Hi, El 27/09/16 a las 01:23, Michael Ellerman escribió: > Emilio López <emilio.lopez@collabora.co.uk> writes: >> El 22/09/16 a las 06:43, Michael Ellerman escribió: >>> Emilio López <emilio.lopez@collabora.co.uk> 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: I tried that over the weekend and it worked, but I wondered if it was the way to go. Thanks for the confirmation :) I've sent a patch for that[0] now. With that resolved, CFLAGS can just be CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra CFLAGS += -I../../../../usr/include/ I'll wait a bit more to see if anyone else has any comments, otherwise I'll send a v2 in a couple of days. Thanks! Emilio [0] https://lkml.org/lkml/2016/9/27/289
[toc] | [prev] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-10-05 04:30 +0200 |
| Message-ID | <soK81-2Sa-3@gated-at.bofh.it> |
| In reply to | #1491963 |
Emilio López <emilio.lopez@collabora.co.uk> writes: > Hi, > > El 27/09/16 a las 01:23, Michael Ellerman escribió: >> Emilio López <emilio.lopez@collabora.co.uk> writes: >>> El 22/09/16 a las 06:43, Michael Ellerman escribió: >>>> Emilio López <emilio.lopez@collabora.co.uk> 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: > > I tried that over the weekend and it worked, but I wondered if it was > the way to go. Thanks for the confirmation :) I've sent a patch for > that[0] now. Great thanks. > With that resolved, CFLAGS can just be > > CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra > CFLAGS += -I../../../../usr/include/ LGTM. cheers
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web