--- a/src/to_cat.c
+++ b/src/to_cat.c
@@ -7,7 +7,15 @@
 # include <string.h>
 #endif
 
-extern char *rindex (const char *, int);	/* not always in <string.h> */
+/* if we don't have the strrchr() function,
+ * then we must fall back to using the older rindex() function,
+ * but (apparently) this isn't always prototyped in string.h
+ */
+#ifndef rindex
+/* i.e. NOT using strrchr()
+ */
+extern char *rindex (const char *, int);
+#endif
 
 #include "defs.h"
 #include "manfile.h"