diff --git a/Source/Decoder.m b/Source/Decoder.m
index 2b3909ac9..1b4dbf4a9 100644
--- a/Source/Decoder.m
+++ b/Source/Decoder.m
@@ -31,6 +31,8 @@
#include
#include
+extern BOOL sel_types_match(const char* t1, const char* t2);
+
static int debug_coder = 0;
@implementation Decoder
diff --git a/Source/Invocation.m b/Source/Invocation.m
index a0e6f0d09..16b620561 100644
--- a/Source/Invocation.m
+++ b/Source/Invocation.m
@@ -30,6 +30,8 @@
#include
#include
+extern BOOL sel_types_match(const char* t1, const char* t2);
+
/* xxx We are currently retaining the return value.
We shouldn't always do this. Make is an option. */
diff --git a/Source/mframe.m b/Source/mframe.m
index ce0a70496..b8991a376 100644
--- a/Source/mframe.m
+++ b/Source/mframe.m
@@ -52,6 +52,8 @@
/* memory.h and strings.h conflict on some systems. */
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
+extern BOOL sel_types_match(const char* t1, const char* t2);
+
/* For encoding and decoding the method arguments, we have to know where
to find things in the "argframe" as returned by __builtin_apply_args.
diff --git a/Source/o_vscanf.c b/Source/o_vscanf.c
index 81de354e6..b33ff6d9b 100644
--- a/Source/o_vscanf.c
+++ b/Source/o_vscanf.c
@@ -79,7 +79,8 @@ extern long strtol(const char *str, char** ptr, int base);
#define inchar() ((c = (*inchar_func)(stream)) == EOF ? EOF : (++read_in, c))
/* #define conv_error() return ((c == EOF || ungetc(c, s)), done) */
-#define conv_error() return ((c == EOF || ((*unchar_func)(stream,c),c)), done)
+//#define conv_error() return ((c == EOF || ((*unchar_func)(stream,c),c)), done)
+#define conv_error() return (c==EOF ? done : ((*unchar_func)(stream,c), done))
#define input_error() return (done == 0 ? EOF : done)
#define memory_error() return ((errno = ENOMEM), EOF)