MFC r314319 (by oshogbo):
Don't try to open devices in the gettc() function which will always
fail in the Capability mode. Instead silently fallback to the syscall
method, which is done for example in the gettimeofday(2) function.
MFC r314320 (by oshogbo):
Remove unneeded variable initialization from r314319.
MFC r321461:
Fix indent.