* [Buildroot] [PATCH 1/1] package/weston: needs headers >= 4.4
@ 2019-06-09 22:27 Fabrice Fontaine
2019-06-10 9:37 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2019-06-09 22:27 UTC (permalink / raw)
To: buildroot
weston includes input-event-codes.h since version 5.0.91 and
https://github.com/wayland-project/weston/commit/6e229ca26381bc8191fd9af1e439c311da709aff
input-event-codes.h is available only since kernel 4.4 and
https://github.com/torvalds/linux/commit/f902dd893427eade90f7eaf858e5ff8b150a5a12
Fixes:
- http://autobuild.buildroot.org/results/210c2759900f15ea0030d088f6f45cd8bb199b29
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/weston/Config.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/weston/Config.in b/package/weston/Config.in
index f874b0cc6a..1b1882b388 100644
--- a/package/weston/Config.in
+++ b/package/weston/Config.in
@@ -1,6 +1,6 @@
-comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0"
+comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 4.4"
depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || \
- !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 || BR2_STATIC_LIBS || \
!BR2_ENABLE_LOCALE
config BR2_PACKAGE_WESTON
@@ -9,7 +9,7 @@ config BR2_PACKAGE_WESTON
depends on BR2_PACKAGE_HAS_UDEV
depends on !BR2_STATIC_LIBS # wayland
depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
- depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 # input-event-codes.h
select BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_WAYLAND_PROTOCOLS
select BR2_PACKAGE_LIBXKBCOMMON
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/weston: needs headers >= 4.4
2019-06-09 22:27 [Buildroot] [PATCH 1/1] package/weston: needs headers >= 4.4 Fabrice Fontaine
@ 2019-06-10 9:37 ` Yann E. MORIN
2019-06-10 10:01 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2019-06-10 9:37 UTC (permalink / raw)
To: buildroot
Fabrice, All,
On 2019-06-10 00:27 +0200, Fabrice Fontaine spake thusly:
> weston includes input-event-codes.h since version 5.0.91 and
> https://github.com/wayland-project/weston/commit/6e229ca26381bc8191fd9af1e439c311da709aff
Actually, that include is in fact not needed. Just remove it, and it
still builds! ;-)
The only #define that is needed from that header is EV_KEY, which
before 4.4 was provided in linux/input.h
So, I'd rather we find a solution with upstream to include the correct
header, along the lines of:
diff --git a/compositor/main.c b/compositor/main.c
index 945f99ae..d3fdb1e4 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -42,7 +42,11 @@
#include <sys/socket.h>
#include <libinput.h>
#include <libevdev/libevdev.h>
+#if define HAS_LINUX_INPUT_EVENT_CODES_H
#include <linux/input-event-codes.h>
+#else
+#include <linux/input.h>
+#endif
#include <sys/time.h>
#include <linux/limits.h>
I'll let you come up with the meson part of that ;-)
(Note: it works if we just remove the include, because linux/input.h
seems to be pulled by another header, but for correctness-sake, we have
to include it explicitly.)
Regards,
Yann E. MORIN.
> input-event-codes.h is available only since kernel 4.4 and
> https://github.com/torvalds/linux/commit/f902dd893427eade90f7eaf858e5ff8b150a5a12
>
> Fixes:
> - http://autobuild.buildroot.org/results/210c2759900f15ea0030d088f6f45cd8bb199b29
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/weston/Config.in | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/weston/Config.in b/package/weston/Config.in
> index f874b0cc6a..1b1882b388 100644
> --- a/package/weston/Config.in
> +++ b/package/weston/Config.in
> @@ -1,6 +1,6 @@
> -comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0"
> +comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 4.4"
> depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || \
> - !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 || BR2_STATIC_LIBS || \
> !BR2_ENABLE_LOCALE
>
> config BR2_PACKAGE_WESTON
> @@ -9,7 +9,7 @@ config BR2_PACKAGE_WESTON
> depends on BR2_PACKAGE_HAS_UDEV
> depends on !BR2_STATIC_LIBS # wayland
> depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
> - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
> + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 # input-event-codes.h
> select BR2_PACKAGE_WAYLAND
> select BR2_PACKAGE_WAYLAND_PROTOCOLS
> select BR2_PACKAGE_LIBXKBCOMMON
> --
> 2.20.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/weston: needs headers >= 4.4
2019-06-10 9:37 ` Yann E. MORIN
@ 2019-06-10 10:01 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2019-06-10 10:01 UTC (permalink / raw)
To: buildroot
Fabrice, All,
On 2019-06-10 11:37 +0200, Yann E. MORIN spake thusly:
> On 2019-06-10 00:27 +0200, Fabrice Fontaine spake thusly:
> > weston includes input-event-codes.h since version 5.0.91 and
> > https://github.com/wayland-project/weston/commit/6e229ca26381bc8191fd9af1e439c311da709aff
>
> Actually, that include is in fact not needed. Just remove it, and it
> still builds! ;-)
So, even with a toolchain with headers 4.20, it is not needed to include
linux/input-event-codes.h.
That's because it is pulled in from linux/input.h, which it self is
pulled in from libevdev/libevdev.h.
So, the patch I suggested earlier is probably the better technically,
but one that just includes linux/input.h instead is simpler.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-10 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-09 22:27 [Buildroot] [PATCH 1/1] package/weston: needs headers >= 4.4 Fabrice Fontaine
2019-06-10 9:37 ` Yann E. MORIN
2019-06-10 10:01 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.