I think the real lesson here is:
Not posting code == 16 hours with people guessing at your problem
Posting code == Answer with exactly what's wrong in about 20 minutes
It would have been even faster if you could have given something to compile like:
Code:
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
struct timespec *tpc;
char *string;
tpc = calloc(1,sizeof(struct timespec));
tpc->tv_sec = 234;
snprintf(string,4,"t is: %lld\n",(long long)tpc->tv_sec);
return 0;
}
The 4 would still be wrong, but we'd been able to see right away what was going on.
-Lee