Index: bin/cat/cat.c =================================================================== --- bin/cat/cat.c +++ bin/cat/cat.c @@ -258,7 +258,9 @@ if (ferror(fp) && errno == EILSEQ) { clearerr(fp); /* Resync attempt. */ +#ifdef __FreeBSD__ memset(&fp->_mbstate, 0, sizeof(mbstate_t)); +#endif if ((ch = getc(fp)) == EOF) break; wch = ch;