Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/plugins/dndcp/fakeMouseWayland: add time64 support #722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zv-io
Copy link

@zv-io zv-io commented Jun 11, 2024

Linux Kernel commit 152194fe9c3f03232b9c0d0264793a7fa4af82f8 changed struct input_event on 32-bit systems.

See also: https://git.adelielinux.org/adelie/packages/-/issues/1210

Linux Kernel commit 152194fe9c3f03232b9c0d0264793a7fa4af82f8
changed struct input_event on 32-bit systems.
@vmwclabot
Copy link
Member

@zv-io, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link
Member

@zv-io, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@vmwclabot
Copy link
Member

@zv-io, VMware has rejected your signed contributor license agreement. The merge can not proceed until the agreement has been resigned. Click here to resign the agreement. Reject reason:

Please complete all fields .e.g. address

@vmwclabot
Copy link
Member

@zv-io, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@johnwvmw
Copy link
Contributor

@zv-io, I am curious. Which Linux release / version did you run into this issue?

@zv-io
Copy link
Author

zv-io commented Jun 14, 2024

@johnwvmw we are Adélie Linux which is a lightweight Linux distro based on musl libc. In attempting to build open-vm-tools for our 32-bit x86 target, we encountered an error because of this Linux commit.

diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 8c5a0bf6ee3520..7288a7c573ccd9 100644
--- a/[include/uapi/linux/input.h](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/input.h?id=eca3be9b95ac7cf9442654a54962859d74f8e38a)
+++ b/[include/uapi/linux/input.h](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/input.h?id=152194fe9c3f03232b9c0d0264793a7fa4af82f8)
@@ -21,10 +21,21 @@
 
 /*
  * The event structure itself
+ * Note that __USE_TIME_BITS64 is defined by libc based on
+ * application's request to use 64 bit time_t.
  */
 
 struct input_event {
+#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL)
 	struct timeval time;
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#else
+	__kernel_ulong_t __sec;
+	__kernel_ulong_t __usec;
+#define input_event_sec  __sec
+#define input_event_usec __usec
+#endif
 	__u16 type;
 	__u16 code;
 	__s32 value;

We define __USE_TIME_BITS64, so struct timeval time does not exist as a member of the struct input_event structure, hence the compilation failure.

We are using linux-headers-5.15.132 at the moment.

Please let me know if you need additional information or an environment to test in.

@vmwclabot
Copy link
Member

@zv-io, VMware has approved your signed contributor license agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants