tty: fix a build failure on sparc