patch for adjtimex syscall by Bob Van Manen <BVanManen@Scene7.com>
appares to compile for me
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1813 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c
index 681fe11..d6c4d20 100644
--- a/coregrind/vg_syscalls.c
+++ b/coregrind/vg_syscalls.c
@@ -954,6 +954,18 @@
KERNEL_DO_SYSCALL(tid,res);
break;
+# if defined(__NR_adjtimex)
+ case __NR_adjtimex: /* syscall 124 */
+ /* int adjtimex(struct timex *buf) */
+ MAYBE_PRINTF("adjtimex ( %p )\n",arg1);
+ SYSCALL_TRACK( pre_mem_write, tst, "adjtimex(buf)",
+ arg1, sizeof(struct timex) );
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res))
+ VG_TRACK( post_mem_write, arg1, sizeof(struct timex) );
+ break;
+# endif
+
/* !!!!!!!!!! New, untested syscalls, 14 Mar 02 !!!!!!!!!! */
# if defined(__NR_setresgid32)
diff --git a/coregrind/vg_unsafe.h b/coregrind/vg_unsafe.h
index dd2b6e0..a0e5937 100644
--- a/coregrind/vg_unsafe.h
+++ b/coregrind/vg_unsafe.h
@@ -57,6 +57,7 @@
#include <linux/cdrom.h> /* for cd-rom ioctls */
#include <sys/user.h> /* for struct user_regs_struct et al */
#include <signal.h> /* for siginfo_t */
+#include <sys/timex.h> /* for struct timex */
#define __USE_LARGEFILE64
#include <sys/stat.h> /* for struct stat */