summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-13 00:49:05 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-13 00:49:05 +0100
commit7170cfbfb70cdce12ea6ec6697ed95c557aa1989 (patch)
treef9035fdb26d9eb775d171318ab68255f11341abe
parentfeba9b7b1d88e505feb6579e41dc45e48c264e6f (diff)
time_value: Fix rpc_time_value_t compatibility.
5fdc928d3d29 ("fix rpc time value for 64 bit") broke hurd build because structures are never compatible in C. For userland we however know that rpc_time_value is the same as time_value, so we can just typedef rpc_time_value_t to struct time_value as userland is used to.
-rw-r--r--include/mach/time_value.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mach/time_value.h b/include/mach/time_value.h
index 3a816b22..2984e88c 100644
--- a/include/mach/time_value.h
+++ b/include/mach/time_value.h
@@ -38,7 +38,6 @@ struct rpc_time_value {
rpc_long_integer_t seconds;
integer_t microseconds;
};
-typedef struct rpc_time_value rpc_time_value_t;
/*
* Time value used by kernel interfaces. Ideally they should be migrated
@@ -50,6 +49,12 @@ struct time_value {
};
typedef struct time_value time_value_t;
+#ifdef KERNEL
+typedef struct rpc_time_value rpc_time_value_t;
+#else
+typedef struct time_value rpc_time_value_t;
+#endif
+
/*
* Time value used internally by the kernel that uses 64 bits to track seconds
* and nanoseconds. Note that the current resolution is only microseconds.