diff options
| author | eroen | 2012-12-15 11:17:50 +0100 |
|---|---|---|
| committer | eroen | 2012-12-15 11:17:50 +0100 |
| commit | e148dd2d2771368c73112e735e9abb4c71dfcf25 (patch) | |
| tree | 122e14265212721d37a919014f633d902bca324d /sys-libs/libfaketime/files | |
| parent | 051436ed552d3e0344310fb2864cf422b1d034c4 (diff) | |
| download | eroen-overlay-e148dd2d2771368c73112e735e9abb4c71dfcf25.tar.gz eroen-overlay-e148dd2d2771368c73112e735e9abb4c71dfcf25.tar.bz2 eroen-overlay-e148dd2d2771368c73112e735e9abb4c71dfcf25.tar.xz | |
libfaketime-0.9.1 added sub-second patches
Diffstat (limited to 'sys-libs/libfaketime/files')
| -rw-r--r-- | sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero-stat.patch | 93 | ||||
| -rw-r--r-- | sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero.patch | 29 |
2 files changed, 122 insertions, 0 deletions
diff --git a/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero-stat.patch b/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero-stat.patch new file mode 100644 index 00000000..17fe1de4 --- /dev/null +++ b/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero-stat.patch @@ -0,0 +1,93 @@ +make sub-second parts all zero for stat calls, to avoid jitter + +From: eroen <eroen@occam.eroen.eu> + + +--- + src/faketime.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/src/faketime.c b/src/faketime.c +index 5e3bcaa..e80a6f9 100644 +--- a/src/faketime.c ++++ b/src/faketime.c +@@ -126,6 +126,9 @@ int __xstat (int ver, const char *path, struct stat *buf) { + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + +@@ -161,6 +164,9 @@ int __fxstat (int ver, int fildes, struct stat *buf) { + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -196,6 +202,9 @@ int __fxstatat(int ver, int fildes, const char *filename, struct stat *buf, int + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -231,6 +240,9 @@ int __lxstat (int ver, const char *path, struct stat *buf) { + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -265,6 +277,9 @@ int __xstat64 (int ver, const char *path, struct stat64 *buf) { + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -299,6 +314,9 @@ int __fxstat64 (int ver, int fildes, struct stat64 *buf) { + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -334,6 +352,9 @@ int __fxstatat64 (int ver, int fildes, const char *filename, struct stat64 *buf, + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; +@@ -369,6 +390,9 @@ int __lxstat64 (int ver, const char *path, struct stat64 *buf){ + buf->st_ctime = fake_time(&(buf->st_ctime)); + buf->st_atime = fake_time(&(buf->st_atime)); + buf->st_mtime = fake_time(&(buf->st_mtime)); ++ buf->st_ctim.tv_nsec = 0; ++ buf->st_atim.tv_nsec = 0; ++ buf->st_mtim.tv_nsec = 0; + } + } + return result; diff --git a/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero.patch b/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero.patch new file mode 100644 index 00000000..614298e6 --- /dev/null +++ b/sys-libs/libfaketime/files/libfaketime-0.9.1-us-zero.patch @@ -0,0 +1,29 @@ +zero all us parts of calls, to avoid jitter. + +From: eroen <eroen@occam.eroen.eu> + + +--- + src/faketime.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/faketime.c b/src/faketime.c +index a20a2ff..5e3bcaa 100644 +--- a/src/faketime.c ++++ b/src/faketime.c +@@ -887,6 +887,7 @@ int fake_gettimeofday(struct timeval *tv, void *tz) { + time_t temp_tt = tv->tv_sec; + + tv->tv_sec = fake_time(&temp_tt); ++ tv->tv_usec = 0u; + + return 0; + } +@@ -898,6 +899,7 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp) { + /* Fake only if the call is realtime clock related */ + if (clk_id == CLOCK_REALTIME) { + tp->tv_sec = fake_time(&temp_tt); ++ tp->tv_nsec = 0l; + } + + return 0; |
