#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun 260
#define __NR_timer_delete 261
#define __NR_clock_settime 262
-#define __NR_clock_gettime 263
+#define __NR_clock_gettime32 263
#define __NR_clock_getres 264
#define __NR_clock_nanosleep 265
#define __NR_statfs64 266
#define __NR_setrlimit 75
#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun (__NR_timer_create+3)
#define __NR_timer_delete (__NR_timer_create+4)
#define __NR_clock_settime (__NR_timer_create+5)
-#define __NR_clock_gettime (__NR_timer_create+6)
+#define __NR_clock_gettime32 (__NR_timer_create+6)
#define __NR_clock_getres (__NR_timer_create+7)
#define __NR_clock_nanosleep (__NR_timer_create+8)
#define __NR_statfs64 268
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun 257
#define __NR_timer_delete 258
#define __NR_clock_settime 259
-#define __NR_clock_gettime 260
+#define __NR_clock_gettime32 260
#define __NR_clock_getres 261
#define __NR_clock_nanosleep 262
#define __NR_statfs64 263
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun 262
#define __NR_timer_delete 263
#define __NR_clock_settime 264
-#define __NR_clock_gettime 265
+#define __NR_clock_gettime32 265
#define __NR_clock_getres 266
#define __NR_clock_nanosleep 267
#define __NR_statfs64 268
#define __NR_setrlimit 4075
#define __NR_getrlimit 4076
#define __NR_getrusage 4077
-#define __NR_gettimeofday 4078
+#define __NR_gettimeofday_time32 4078
#define __NR_settimeofday 4079
#define __NR_getgroups 4080
#define __NR_setgroups 4081
#define __NR_timer_getoverrun 4260
#define __NR_timer_delete 4261
#define __NR_clock_settime 4262
-#define __NR_clock_gettime 4263
+#define __NR_clock_gettime32 4263
#define __NR_clock_getres 4264
#define __NR_clock_nanosleep 4265
#define __NR_tgkill 4266
#define __NR_fchown 6091
#define __NR_lchown 6092
#define __NR_umask 6093
-#define __NR_gettimeofday 6094
+#define __NR_gettimeofday_time32 6094
#define __NR_getrlimit 6095
#define __NR_getrusage 6096
#define __NR_sysinfo 6097
#define __NR_timer_getoverrun 6223
#define __NR_timer_delete 6224
#define __NR_clock_settime 6225
-#define __NR_clock_gettime 6226
+#define __NR_clock_gettime32 6226
#define __NR_clock_getres 6227
#define __NR_clock_nanosleep 6228
#define __NR_tgkill 6229
#define __NR_timer_settime 110
#define __NR_timer_delete 111
#define __NR_clock_settime 112
-#define __NR_clock_gettime 113
+#define __NR_clock_gettime32 113
#define __NR_clock_getres 114
#define __NR_clock_nanosleep 115
#define __NR_syslog 116
#define __NR_umask 166
#define __NR_prctl 167
#define __NR_getcpu 168
-#define __NR_gettimeofday 169
+#define __NR_gettimeofday_time32 169
#define __NR_settimeofday 170
#define __NR_adjtimex 171
#define __NR_getpid 172
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun 243
#define __NR_timer_delete 244
#define __NR_clock_settime 245
-#define __NR_clock_gettime 246
+#define __NR_clock_gettime32 246
#define __NR_clock_getres 247
#define __NR_clock_nanosleep 248
#define __NR_swapcontext 249
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
-#define __NR_gettimeofday 78
+#define __NR_gettimeofday_time32 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_timer_getoverrun 262
#define __NR_timer_delete 263
#define __NR_clock_settime 264
-#define __NR_clock_gettime 265
+#define __NR_clock_gettime32 265
#define __NR_clock_getres 266
#define __NR_clock_nanosleep 267
#define __NR_statfs64 268
#define SYS_sendfile SYS_sendfile64
#endif
+#ifndef SYS_clock_gettime
+#define SYS_clock_gettime SYS_clock_gettime32
+#endif
+
+#ifndef SYS_gettimeofday
+#define SYS_gettimeofday SYS_gettimeofday_time32
+#endif
/* Ensure that the plain syscall names are defined even for "time64-only"
* archs. These facilitate callers passing null time arguments, and make