diff --git a/deps/rust-tpm-20-ref/smallc/src/time.c b/deps/rust-tpm-20-ref/smallc/src/time.c index ed46401..720eddd 100644 --- a/deps/rust-tpm-20-ref/smallc/src/time.c +++ b/deps/rust-tpm-20-ref/smallc/src/time.c @@ -1,5 +1,6 @@ #include #include +#include const char __utc[] = "UTC"; @@ -31,3 +32,18 @@ struct tm *gmtime(const time_t *t) tm.__tm_zone = __utc; return &tm; } + +// Add an empty implementation for gettimeofday +struct timeval { + long tv_sec; /* time value, in seconds */ + long tv_usec; /* time value, in microseconds */ +}; +struct timezone { + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +int gettimeofday ( struct timeval * tv , struct timezone * tz ){ + assert(0); + return 1; +}