Fix error: conflicting types for ‘getDevice’

Fix compile errors:

pty.c:424: error: conflicting types for ‘getDevice’
pty.c:160: error: previous declaration of ‘getDevice’ was here