libc/rpc: Use sig_t (fixes -Wstrict-prototypes).
authorSascha Wildner <saw@online.de>
Thu, 11 Apr 2019 19:25:18 +0000 (21:25 +0200)
committerSascha Wildner <saw@online.de>
Thu, 11 Apr 2019 19:39:55 +0000 (21:39 +0200)
lib/libc/rpc/auth_time.c

index f9b4c1c..285a285 100644 (file)
@@ -249,7 +249,7 @@ __rpc_get_time_offset(struct timeval *td,   /* Time difference                      */
        char                    ut[64], ipuaddr[64];
        endpoint                teps[32];
        nis_server              tsrv;
-       void                    (*oldsig)() = NULL; /* old alarm handler */
+       sig_t                   oldsig = NULL; /* old alarm handler */
        struct sockaddr_in      sin;
        socklen_t               len;
        int                     s = RPC_ANYSOCK;
@@ -418,7 +418,7 @@ __rpc_get_time_offset(struct timeval *td,   /* Time difference                      */
                } else {
                        int res;
 
-                       oldsig = (void (*)())signal(SIGALRM, alarm_hndler);
+                       oldsig = 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));