X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/224c70764cab4e0e39a26aaf3ad3016552f62f55..fbd86d4cc20b02a10edcca92fb7ae0a143e63cc4:/gen/FreeBSD/time.c.patch diff --git a/gen/FreeBSD/time.c.patch b/gen/FreeBSD/time.c.patch index 6433f6f..df72dfe 100644 --- a/gen/FreeBSD/time.c.patch +++ b/gen/FreeBSD/time.c.patch @@ -1,6 +1,6 @@ ---- time.c.orig 2004-11-25 11:38:01.000000000 -0800 -+++ time.c 2005-03-24 14:09:30.000000000 -0800 -@@ -39,6 +39,7 @@ +--- time.c.orig 2008-07-30 13:29:30.000000000 -0700 ++++ time.c 2008-07-30 13:36:03.000000000 -0700 +@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/tim #include #include @@ -8,19 +8,25 @@ time_t time(t) -@@ -46,12 +47,15 @@ +@@ -46,12 +47,21 @@ time(t) { struct timeval tt; time_t retval; ++#ifdef FE_DFL_ENV + fenv_t fenv; ++#endif /* FE_DFL_ENV */ ++#ifdef FE_DFL_ENV + fegetenv(&fenv); /* 3965505 - need to preserve floating point enviroment */ ++#endif /* FE_DFL_ENV */ if (gettimeofday(&tt, (struct timezone *)0) < 0) retval = -1; else retval = tt.tv_sec; if (t != NULL) *t = retval; ++#ifdef FE_DFL_ENV + fesetenv(&fenv); ++#endif /* FE_DFL_ENV */ return (retval); }