blob: a3ce7a6a6a03948aec6b148df93097fa7462e16a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 3bca72de3c30598c585c910208459a0cf05b9f0d Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@gmail.com>
Date: Fri, 25 Mar 2016 13:21:53 +0100
Subject: [PATCH] Move hrtime_t timestruc_t and timespec_t and change
longlong_t to long long
hrtime_t timestruc_t and timespec_t should have originally be included in
sys/time.h so lets move them.
longlong_t is not defined by any standard so change it to long long
---
lib/libspl/include/sys/time.h | 5 +++++
lib/libspl/include/sys/types.h | 4 ----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
index f0da440..03da3f7 100644
--- a/lib/libspl/include/sys/time.h
+++ b/lib/libspl/include/sys/time.h
@@ -58,6 +58,11 @@
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#endif
+typedef long long hrtime_t;
+typedef struct timespec timestruc_t;
+typedef struct timespec timespec_t;
+
+
extern hrtime_t gethrtime(void);
extern void gethrestime(timestruc_t *);
diff --git a/lib/libspl/include/sys/types.h b/lib/libspl/include/sys/types.h
index 25d56be..8996af9 100644
--- a/lib/libspl/include/sys/types.h
+++ b/lib/libspl/include/sys/types.h
@@ -55,10 +55,6 @@ typedef longlong_t diskaddr_t;
typedef ulong_t pgcnt_t; /* number of pages */
typedef long spgcnt_t; /* signed number of pages */
-typedef longlong_t hrtime_t;
-typedef struct timespec timestruc_t;
-typedef struct timespec timespec_t;
-
typedef short pri_t;
typedef int zoneid_t;
|