summaryrefslogtreecommitdiffstats
path: root/man3/rtime.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/rtime.3')
-rw-r--r--man3/rtime.312
1 files changed, 6 insertions, 6 deletions
diff --git a/man3/rtime.3 b/man3/rtime.3
index 0abcf6fce..80ee2655f 100644
--- a/man3/rtime.3
+++ b/man3/rtime.3
@@ -115,12 +115,12 @@ The result is the localtime of the computer "linux".
#include <stdlib.h>
#include <string.h>
#include <time.h>
-
+\&
#include <rpc/auth_des.h>
-
+\&
static int use_tcp = 0;
static const char servername[] = "linux";
-
+\&
int
main(void)
{
@@ -130,12 +130,12 @@ main(void)
struct rpc_timeval time1 = {0, 0};
struct rpc_timeval timeout = {1, 0};
struct sockaddr_in name;
-
+\&
memset(&name, 0, sizeof(name));
sethostent(1);
hent = gethostbyname(servername);
memcpy(&name.sin_addr, hent\->h_addr, hent\->h_length);
-
+\&
ret = rtime(&name, &time1, use_tcp ? NULL : &timeout);
if (ret < 0)
perror("rtime error");
@@ -143,7 +143,7 @@ main(void)
t = time1.tv_sec;
printf("%s\en", ctime(&t));
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE