summaryrefslogtreecommitdiff
path: root/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci
blob: ff17ebdee97ae327740afa6b31c8b63cd5acd93c (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
// ----------------------------------------------------------------------------
// handle gettime64 to gettime function assignments
@r1@
expression E1, E2;
@@
+#if LINUX_VERSION_IS_GEQ(4,1,0)
 E1.gettime64 = E2;
+#else
+E1.gettime = E2;
+#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */

// ----------------------------------------------------------------------------
// handle calls to gettime64 as calls to gettime
@r2@
expression E1, E2, E3;
@@
+#if LINUX_VERSION_IS_GEQ(4,1,0)
 E1.gettime64(E2, E3);
+#else
+E1.gettime(E2, E3);
+#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */

// ----------------------------------------------------------------------------
// handle settime64 to settime function assignments
@r3@
expression E1, E2;
@@
+#if LINUX_VERSION_IS_GEQ(4,1,0)
 E1.settime64 = E2;
+#else
+E1.settime = E2;
+#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */