From 929d5af546eb0e149f50eb77b5b6a6e63d0d6ff9 Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Tue, 1 Sep 2015 07:33:36 +0000 Subject: [PATCH] Use correct function prototype for signal handler. Eliminates gcc 4.9 warning. --- lib/libc/rpc/auth_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c index 4eafbbb83f3b..4b714468b92e 100644 --- a/lib/libc/rpc/auth_time.c +++ b/lib/libc/rpc/auth_time.c @@ -255,7 +255,7 @@ __rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost, char ut[64], ipuaddr[64]; endpoint teps[32]; nis_server tsrv; - void (*oldsig)() = NULL; /* old alarm handler */ + void (*oldsig)(int) = NULL; /* old alarm handler */ struct sockaddr_in sin; socklen_t len; int s = RPC_ANYSOCK; @@ -424,7 +424,7 @@ __rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost, } else { int res; - oldsig = (void (*)())signal(SIGALRM, alarm_hndler); + oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler); saw_alarm = 0; /* global tracking the alarm */ alarm(20); /* only wait 20 seconds */ res = _connect(s, (struct sockaddr *)&sin, sizeof(sin));