diff options
author | Jason Sams <jsams@google.com> | 2013-03-14 16:02:18 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2013-03-15 12:01:29 -0700 |
commit | 110f181b7966212a36ef18016f9b81c7322d0a2f (patch) | |
tree | 70a951e191d53b5a3b483c312f1e691174b0f943 /rsScriptC_Lib.cpp | |
parent | 5a1fa4f6c8efa96badaba98afabdd66bb07486d7 (diff) | |
download | rs-110f181b7966212a36ef18016f9b81c7322d0a2f.tar.gz |
Reduce diffs with compat lib.
Change-Id: Ibfa2c7c7da56d158f424ac343e364feacd0a21da
Diffstat (limited to 'rsScriptC_Lib.cpp')
-rw-r--r-- | rsScriptC_Lib.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rsScriptC_Lib.cpp b/rsScriptC_Lib.cpp index e8c9d1d4..a8591f50 100644 --- a/rsScriptC_Lib.cpp +++ b/rsScriptC_Lib.cpp @@ -92,7 +92,12 @@ tm* rsrLocalTime(Context *rsc, tm *local, time_t *timer) { // have to apply locking for proper behavior in RenderScript. pthread_mutex_lock(&rsc->gLibMutex); tm *tmp = localtime(timer); +#ifndef RS_COMPATIBILITY_LIB memcpy(local, tmp, sizeof(*tmp)); +#else + // WORKAROUND to struct rs_tm != struct tm + memcpy(local, tmp, sizeof(int)*9); +#endif pthread_mutex_unlock(&rsc->gLibMutex); return local; } |