Lines 36-41
Link Here
|
36 |
#include <signal.h> |
36 |
#include <signal.h> |
37 |
#include <setjmp.h> |
37 |
#include <setjmp.h> |
38 |
|
38 |
|
|
|
39 |
/*BSD has no stime() function*/ |
40 |
#ifndef HAVE_STIME |
41 |
#include <sys/time.h> |
42 |
|
43 |
int stime(time_t *t) |
44 |
{ |
45 |
struct timeval tv; |
46 |
tv.tv_sec = *t; |
47 |
tv.tv_usec = 0; |
48 |
|
49 |
if(settimeofday(&tv, NULL) < 0) |
50 |
return -1; |
51 |
|
52 |
return 0; |
53 |
} |
54 |
#endif |
55 |
|
39 |
/* difference between Unix time and net time */ |
56 |
/* difference between Unix time and net time */ |
40 |
#define BASE1970 2208988800L |
57 |
#define BASE1970 2208988800L |
41 |
#define DEFAULT_PORT 37 |
58 |
#define DEFAULT_PORT 37 |