From 6d9ab80fce79d4befb78b6264b0cfe789cdeac58 Mon Sep 17 00:00:00 2001 From: bz Date: Sat, 21 Jan 2006 10:44:34 +0000 Subject: Fix stack corruptions on amd64. Vararg functions have a different calling convention than regular functions on amd64. Casting a varag function to a regular one to match the function pointer declaration will hide the varargs from the caller and we will end up with an incorrectly setup stack. Entirely remove the varargs from these functions and change the functions to match the declaration of the function pointers. Remove the now unnecessary casts. Lots of explanations and help from: peter Reviewed by: peter PR: amd64/89261 MFC after: 6 days --- sys/netipsec/keysock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netipsec/keysock.h') diff --git a/sys/netipsec/keysock.h b/sys/netipsec/keysock.h index d8d27d2..a331b5e 100644 --- a/sys/netipsec/keysock.h +++ b/sys/netipsec/keysock.h @@ -71,7 +71,7 @@ struct keycb { extern struct pfkeystat pfkeystat; -extern int key_output __P((struct mbuf *, ...)); +extern int key_output(struct mbuf *m, struct socket *so); extern int key_usrreq __P((struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *)); -- cgit v1.1