#define mem_free(ptr, bsize) free(ptr)
#endif
-#if defined(AFS_AMD64_LINUX24_ENV) || defined(AFS_DARWIN_ENV) || (defined(KERNEL) && !defined(UKERNEL))
+#if defined(AFS_AMD64_LINUX24_ENV) || defined(AFS_DARWIN_ENV)
#define xdr_alloc afs_xdr_alloc
#define xdr_free afs_xdr_free
#define xdr_void afs_xdr_void
* allocate dynamic storage of the appropriate size and return it.
* bool_t (*xdrproc_t)(XDR *, caddr_t *);
*/
-#if 0
-typedef bool_t(*xdrproc_t) ();
-#else
-#ifdef AFS_I386_LINUX26_ENV
-typedef bool_t(*xdrproc_t) (void *, caddr_t *, u_int);
+
+/* We need a different prototype for i386 Linux kernel code, because it
+ * uses a register (rather than stack) based calling convention. The
+ * normal va_args prototype results in the arguments being placed on the
+ * stack, where they aren't accessible to the 'real' function.
+ */
+#if defined(AFS_I386_LINUX26_ENV) && defined(KERNEL) && !defined(UKERNEL)
+typedef bool_t(*xdrproc_t) (void *, caddr_t, u_int);
#else
typedef bool_t(*xdrproc_t) (void *, ...);
#endif
-#endif
-
/*
* The XDR handle.