summaryrefslogtreecommitdiff
path: root/devel/libf2c/patches/patch-aj
blob: 8e242d59878eda9afa5e9b6ea173cd847548c652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-aj,v 1.1 2009/12/07 13:00:56 tnn Exp $

--- signal_.c.orig	2000-07-05 04:04:56.000000000 +0200
+++ signal_.c
@@ -1,10 +1,11 @@
+#include <stdint.h>
 #include "f2c.h"
 #include "signal1.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
 
- ftnint
+ftnint
 #ifdef KR_headers
 signal_(sigp, proc) integer *sigp; sig_pf proc;
 #else
@@ -14,7 +15,8 @@ signal_(integer *sigp, sig_pf proc)
 	int sig;
 	sig = (int)*sigp;
 
-	return (ftnint)signal(sig, proc);
+	/* xxx amd64 can't hold the return value */
+	return (ftnint)(uintptr_t)signal(sig, proc);
 	}
 #ifdef __cplusplus
 }