Bug#1067616: FTBFS: error: ‘struct input_event’ has no member named ‘time’

2024-04-19 Thread Andreas Beckmann
Followup-For: Bug #1067616
Control: tag -1 patch

I'm attaching a patch fixing input_event.time usage.

Andreas
>From 8435c93a70ae65035002d0039a9a511a5974df90 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann 
Date: Fri, 19 Apr 2024 17:12:42 +0200
Subject: [PATCH 1/2] fix --link-doc package

---
 debian/changelog | 6 ++
 debian/rules | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a124d88..05ea064 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+clanlib (1.0~svn3827-12) UNRELEASED; urgency=medium
+
+  * Fix --link-doc package.
+
+ -- Andreas Beckmann   Fri, 19 Apr 2024 17:10:30 +0200
+
 clanlib (1.0~svn3827-11.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/rules b/debian/rules
index ccb1097..0bd042f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,7 +46,7 @@ override_dh_auto_clean:
rm -f Documentation/Tutorial/Kavanek/*.html
 
 override_dh_installdocs-arch:
-   dh_installdocs --link-doc=libclanapp-1.0v5
+   dh_installdocs --link-doc=libclanapp-1.0t64
 
 override_dh_installexamples-indep:
dh_installexamples -pclanlib-doc Examples/*
-- 
2.20.1

>From 822447ffd6362ea37f48441f630275a98c0b2d34 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann 
Date: Fri, 19 Apr 2024 18:22:23 +0200
Subject: [PATCH 2/2] work around struct input_event.time kernel api change

---
 debian/changelog  |  1 +
 debian/patches/input_event.time.patch | 30 +++
 debian/patches/series |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 debian/patches/input_event.time.patch

diff --git a/debian/changelog b/debian/changelog
index 05ea064..4c916e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 clanlib (1.0~svn3827-12) UNRELEASED; urgency=medium
 
   * Fix --link-doc package.
+  * Work around struct input_event.time kernel api change.  (Closes: #1067616)
 
  -- Andreas Beckmann   Fri, 19 Apr 2024 17:10:30 +0200
 
diff --git a/debian/patches/input_event.time.patch 
b/debian/patches/input_event.time.patch
new file mode 100644
index 000..e52873d
--- /dev/null
+++ b/debian/patches/input_event.time.patch
@@ -0,0 +1,30 @@
+Author: Andreas Beckmann 
+Description: work around struct input_event.time kernel api change
+ 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+--- a/Sources/GL/GLX/input_device_linuxevent.cpp
 b/Sources/GL/GLX/input_device_linuxevent.cpp
+@@ -266,12 +266,12 @@ CL_InputDevice_LinuxEvent::keep_alive()
+   if (ev[i].type == EV_SYN) 
+   {
+   printf("Event: time %ld.%06ld, 
-- %s \n",
+-   
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report 
Sync" );
++   
ev[i].input_event_sec, ev[i].input_event_usec, ev[i].code ? "Config Sync" : 
"Report Sync" );
+   }
+   else if (ev[i].type == EV_MSC && 
(ev[i].code == MSC_RAW || ev[i].code == MSC_SCAN)) 
+   {
+   printf("Event: time %ld.%06ld, 
type %d (%s), code %d (%s), value %02x\n",
+-   
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
++   
ev[i].input_event_sec, ev[i].input_event_usec, ev[i].type,
+
events[ev[i].type] ? events[ev[i].type] : "?",
+ev[i].code,
+
names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? 
names[ev[i].type][ev[i].code] : "?") : "?",
+@@ -280,7 +280,7 @@ CL_InputDevice_LinuxEvent::keep_alive()
+   else 
+   {
+   printf("Event: time %ld.%06ld, 
type %d (%s), code %d (%s), value %d\n",
+-   
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
++   
ev[i].input_event_sec, ev[i].input_event_usec, ev[i].type,
+
events[ev[i].type] ? events[ev[i].type] : "?",
+ev[i].code,
+
names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? 
names[ev[i].type][ev[i].code] : "?") : "?",
diff --git a/debian/patches/series b/debian/patches/series

Bug#1067616: FTBFS: error: ‘struct input_event’ has no member named ‘time’

2024-03-24 Thread Simon McVittie
On Sun, 24 Mar 2024 at 23:06:18 +0500, Andrey Rakhmatullin wrote:
> GLX/input_device_linuxevent.cpp: In member function ‘virtual void
> CL_InputDevice_LinuxEvent::keep_alive()’:
> GLX/input_device_linuxevent.cpp:269:72: error: ‘struct input_event’ has no
> member named ‘time’
>   269 |
> ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report
> Sync" );

Looks like another instance of essentially the same issue that's fixed in
SDL by . Applying the
same technique would probably work here too.

smcv



Bug#1067616: FTBFS: error: ‘struct input_event’ has no member named ‘time’

2024-03-24 Thread Andrey Rakhmatullin
Source: clanlib
Version: 1.0~svn3827-11.1
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/fetch.php?pkg=clanlib=armel=1.0%7Esvn3827-11.1=1711185366=0

GLX/input_device_linuxevent.cpp: In member function ‘virtual void
CL_InputDevice_LinuxEvent::keep_alive()’:
GLX/input_device_linuxevent.cpp:269:72: error: ‘struct input_event’ has no
member named ‘time’
  269 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report
Sync" );
  |
^~~~
GLX/input_device_linuxevent.cpp:269:91: error: ‘struct input_event’ has no
member named ‘time’
  269 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report
Sync" );
  |
^~~~
GLX/input_device_linuxevent.cpp:274:72: error: ‘struct input_event’ has no
member named ‘time’
  274 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
  |
^~~~
GLX/input_device_linuxevent.cpp:274:91: error: ‘struct input_event’ has no
member named ‘time’
  274 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
  |
^~~~
GLX/input_device_linuxevent.cpp:283:72: error: ‘struct input_event’ has no
member named ‘time’
  283 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
  |
^~~~
GLX/input_device_linuxevent.cpp:283:91: error: ‘struct input_event’ has no
member named ‘time’
  283 |
ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled