From 3505e85bfcb9dac13972c0d28005aebb32166229 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 28 Jul 2020 03:51:43 -0700 Subject: [PATCH] [biabd] delete model of gettimeofday() Summary: This stopped compiling on my Debian and it seems hard to fix. It was already having compilation issues between osx and Linux but here I don't know how to detect which type it wants since the OS is Linux too. Reviewed By: ezgicicek Differential Revision: D22728282 fbshipit-source-id: 818ae87e6 --- infer/models/c/src/libc_basic.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/infer/models/c/src/libc_basic.c b/infer/models/c/src/libc_basic.c index a877485b1..4e591cb6c 100644 --- a/infer/models/c/src/libc_basic.c +++ b/infer/models/c/src/libc_basic.c @@ -1415,30 +1415,6 @@ int getrusage(int who, struct rusage* r_usage) { return ret; } -#ifdef __APPLE__ -#define gettimeofday_tzp_decl void* __restrict tzp -#else -#ifdef __CYGWIN__ -#define gettimeofday_tzp_decl void* __restrict tzp -#else -#define gettimeofday_tzp_decl struct timezone* __restrict tzp -#endif -#endif - -int gettimeofday(struct timeval* __restrict tp, gettimeofday_tzp_decl) { - struct timeval tmp_tp; - struct timezone tmp_tzp; - int success; - - if (tp != 0) - *tp = tmp_tp; - if (tzp != 0) - *(struct timezone*)tzp = tmp_tzp; - - success = __infer_nondet_int(); - return success ? 0 : -1; -} - struct tm* localtime_r(const time_t* __restrict timer, struct tm* __restrict result) { int success;