I believe this is a standard UNIX error message, not just exlusive to Linux libc.

here's code to make the message appear:

#include <errno.h>

int main() {
   errno = ENOTTY;
   perror( "foo" );
   return 0;
}

Yep. The message isn't "not a typewriter" on my glibc system. If I weren't lazy I'd boot up my OpenBSD box and try it on there to see what it says. But that's if I weren't lazy.