Use correct function prototype for signal handler.
Eliminates gcc 4.9 warning.
This commit is contained in:
parent
a7c2cd38d4
commit
929d5af546
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287348
@ -255,7 +255,7 @@ __rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost,
|
|||||||
char ut[64], ipuaddr[64];
|
char ut[64], ipuaddr[64];
|
||||||
endpoint teps[32];
|
endpoint teps[32];
|
||||||
nis_server tsrv;
|
nis_server tsrv;
|
||||||
void (*oldsig)() = NULL; /* old alarm handler */
|
void (*oldsig)(int) = NULL; /* old alarm handler */
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
socklen_t len;
|
socklen_t len;
|
||||||
int s = RPC_ANYSOCK;
|
int s = RPC_ANYSOCK;
|
||||||
@ -424,7 +424,7 @@ __rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost,
|
|||||||
} else {
|
} else {
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
oldsig = (void (*)())signal(SIGALRM, alarm_hndler);
|
oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler);
|
||||||
saw_alarm = 0; /* global tracking the alarm */
|
saw_alarm = 0; /* global tracking the alarm */
|
||||||
alarm(20); /* only wait 20 seconds */
|
alarm(20); /* only wait 20 seconds */
|
||||||
res = _connect(s, (struct sockaddr *)&sin, sizeof(sin));
|
res = _connect(s, (struct sockaddr *)&sin, sizeof(sin));
|
||||||
|
Loading…
Reference in New Issue
Block a user