void
afs_osi_SetTime(osi_timeval_t * tvp)
{
- extern int (*sys_settimeofdayp) (struct timeval * tv,
- struct timezone * tz);
-#ifdef AFS_LINUX_64BIT_KERNEL
+#if defined(AFS_LINUX24_ENV)
+
+#if defined(AFS_LINUX26_ENV)
+ struct timespec tv;
+ tv.tv_sec = tvp->tv_sec;
+ tv.tv_nsec = tvp->tv_usec * NSEC_PER_USEC;
+#else
struct timeval tv;
- AFS_STATCNT(osi_SetTime);
tv.tv_sec = tvp->tv_sec;
tv.tv_usec = tvp->tv_usec;
- (void)(*sys_settimeofdayp) (&tv, NULL);
+#endif
+
+ AFS_STATCNT(osi_SetTime);
+
+ do_settimeofday(&tv);
#else
+ extern int (*sys_settimeofdayp) (struct timeval * tv,
+ struct timezone * tz);
+
KERNEL_SPACE_DECL;
AFS_STATCNT(osi_SetTime);
#define __NR_setgroups32 82 /* This number is not exported for some bizarre reason. */
#endif
+#if !defined(AFS_LINUX24_ENV)
asmlinkage int (*sys_settimeofdayp) (struct timeval * tv,
struct timezone * tz);
+#endif
asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
#ifdef EXPORTED_SYS_CALL_TABLE
{
#if defined(AFS_IA64_LINUX20_ENV)
unsigned long kernel_gp = 0;
- static struct fptr sys_settimeofday, sys_setgroups;
+ static struct fptr sys_setgroups;
#endif
extern int afs_syscall();
extern long afs_xsetgroups();
#endif
/* Initialize pointers to kernel syscalls. */
-#if defined(AFS_IA64_LINUX20_ENV)
- kernel_gp = ((struct fptr *)printk)->gp;
-
- sys_settimeofdayp = (void *)&sys_settimeofday;
-
- ((struct fptr *)sys_settimeofdayp)->ip =
- SYSCALL2POINTER sys_call_table[__NR_settimeofday - 1024];
- ((struct fptr *)sys_settimeofdayp)->gp = kernel_gp;
-
-#else /* !AFS_IA64_LINUX20_ENV */
+#if !defined(AFS_LINUX24_ENV)
sys_settimeofdayp = SYSCALL2POINTER sys_call_table[__NR_settimeofday];
#endif /* AFS_IA64_LINUX20_ENV */
AC_MSG_CHECKING(if kernel uses MODVERSIONS)
AC_CACHE_VAL(ac_cv_linux_config_modversions,[
AC_TRY_COMPILE(
-[#include <linux/config.h>
+[#include <linux/version.h>
+#include <linux/config.h>
],
-[#ifndef CONFIG_MODVERSIONS
+[#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
lose;
#endif
],