Hi,

On Wed, 31 Jan 2024 20:27:14 +0000 Steve Langasek <vor...@debian.org> wrote:
> If you have any concerns about this patch, please reach out ASAP.  Although
> this package will be uploaded to experimental immediately, there will be a
> period of several days before we begin uploads to unstable; so if information
> becomes available that your package should not be included in the transition,
> there is time for us to amend the planned uploads.

Enabling 64-bit time_t without any extra changes breaks this
library. The Kernel ABI is 32-bit, so the last field in
'struct cs_mmap_config_block' from kernel-headers/linux/cs-protocol.h
needs to be u32 seconds + u32 nanoseconds. I attached a patch,
which imports the latest kernel ABI (untested, since I currently
do not have enough time for it).

Note, that the kernel ABI has never been changed, since the unsigned
32 bit value only overflows in 2106 and then supporting the Nokia
N900/N950/N9 modem (which only supports GSM and UMTS) is no longer
expected to be relevant.

-- Sebastian
diff --git a/kernel-headers/linux/cs-protocol.h b/kernel-headers/linux/cs-protocol.h
index 9c23b7a..d01be14 100644
--- a/kernel-headers/linux/cs-protocol.h
+++ b/kernel-headers/linux/cs-protocol.h
@@ -87,6 +87,15 @@ struct cs_buffer_config {
 	__u32 reserved[4];
 };
 
+/*
+ * struct for monotonic timestamp taken when the
+ * last control command was received
+ */
+struct cs_timestamp {
+        __u32 tv_sec;  /* seconds */
+        __u32 tv_nsec; /* nanoseconds */
+};
+
 /*
  * Struct describing the layout and contents of the driver mmap area.
  * This information is meant as read-only information for the application.
@@ -107,7 +116,7 @@ struct cs_mmap_config_block {
 	 * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
 	 * timestamp taken when the last control command was received
 	 */
-	struct timespec tstamp_rx_ctrl;
+	struct cs_timestamp tstamp_rx_ctrl;
 };
 
 #define CS_IO_MAGIC		'C'

Attachment: signature.asc
Description: PGP signature

Reply via email to