summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 14:37:40 +0000
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 14:37:40 +0000
commit735e98759c0f860727c24c4cdb14235abdeb8879 (patch)
tree30c8fa972cfee83f4e0a6b4260a486525f4f6ab7 /examples
parent12d31ba2b8b4c0e15567d427abef97a184450b1f (diff)
downloadsamba-735e98759c0f860727c24c4cdb14235abdeb8879.tar.gz
Replace GetTimeOfDay() with gettimeofday() in example program.
GetTimeOfDay() seems to no longer be exported. For the smbsh example, just use the native gettimeofday() for now. (This used to be commit 296a6783fbc03460e87ac4136a0a9e6d2743b2ff)
Diffstat (limited to 'examples')
-rw-r--r--examples/libsmbclient/smbwrapper/select.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/libsmbclient/smbwrapper/select.c b/examples/libsmbclient/smbwrapper/select.c
index 4e87a2e2e8e..bb7a25f13e8 100644
--- a/examples/libsmbclient/smbwrapper/select.c
+++ b/examples/libsmbclient/smbwrapper/select.c
@@ -72,13 +72,12 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
int ret;
fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf;
struct timeval tval2, *ptval, end_time, now_time;
- extern void GetTimeOfDay(struct timeval *tval);
readfds2 = (readfds ? &readfds_buf : NULL);
writefds2 = (writefds ? &writefds_buf : NULL);
errorfds2 = (errorfds ? &errorfds_buf : NULL);
if (tval) {
- GetTimeOfDay(&end_time);
+ gettimeofday(&end_time, NULL);
end_time.tv_sec += tval->tv_sec;
end_time.tv_usec += tval->tv_usec;
end_time.tv_sec += end_time.tv_usec / 1000000;
@@ -96,7 +95,7 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
if (errorfds)
errorfds_buf = *errorfds;
if (tval) {
- GetTimeOfDay(&now_time);
+ gettimeofday(&now_time, NULL);
tval2.tv_sec = end_time.tv_sec - now_time.tv_sec;
tval2.tv_usec = end_time.tv_usec - now_time.tv_usec;
if ((signed long) tval2.tv_usec < 0) {