Can reproduce diff probs with other kernels. I had upgraded libc6 at same time as kernel. Sorry, I should report in libc6 when I figure it out.
32-bit powerpc [EMAIL PROTECTED]:~/src$ gcc -Wall -Werror -o gettimeofday gettimeofday.c [EMAIL PROTECTED]:~/src$ ./gettimeofday (nil) <- NULL not expected! Segmentation fault <- Expected with NULL in vmlinux 64-bit amd64 [EMAIL PROTECTED]:~/public_html/c-run$ ./gettimeofday 0xf7e8cc8c <- Not NULL, 18589.085472 <- but WRONG Computer won't even give me the time of day.
/* #include <stdlib.h> */ #include <stdio.h> #include <sys/time.h> #include <time.h> int main() { struct timeval *tp; /* struct timeval { unsigned long tv_sec; unsigned long tv_usec; } *tp; struct timeval { time_t tv_sec; suseconds_t tv_usec; } *tp; int j; */ printf("%p\n",tp); /* says (nil) ! */ /* j=gettimeofday(tp, (struct timezone *)0); */ gettimeofday(tp, 0); printf("%lu.%06lu\n", tp->tv_sec, tp->tv_usec); /* exit(0); */ return 0; }