projects
/
platform
/
core
/
security
/
auth-fw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e92ac5
)
Replace stime to clock_settime
sandbox/playchang/glibc_236
author
wchang kim
<wchang.kim@samsung.com>
Tue, 30 May 2023 00:00:25 +0000
(09:00 +0900)
committer
wchang kim
<wchang.kim@samsung.com>
Tue, 30 May 2023 00:00:25 +0000
(09:00 +0900)
tests/test-client.cpp
patch
|
blob
|
history
diff --git
a/tests/test-client.cpp
b/tests/test-client.cpp
index f01aa5c50a64cea46b2c122e6fd1bd5f5bb314a2..1fae932640756f32a4243995e99fc11e10f97c2c 100644
(file)
--- a/
tests/test-client.cpp
+++ b/
tests/test-client.cpp
@@
-24,6
+24,7
@@
#include <klay/testbench.h>
#include "test-util.h"
+#include <time.h>
#include <auth-passwd.h>
#include <auth-passwd-admin.h> /* for init/deinit */
@@
-91,7
+92,10
@@
int set_relative_date(int days)
time_t as_is = ::time(NULL);
time_t to_be = as_is + (days * 86400);
- return ::stime(&to_be);
+ timespec ts = {};
+ ts.tv_sec = to_be;
+
+ return clock_settime(CLOCK_REALTIME, &ts);
}
} // anonymous namespace