I find that adding -D_GNU_SOURCE is useful for linux. This define enable more features from header files. First) i found that define enable declaration/definition of following methods - grantpt(...) - unlockpt(...) - ptsname(...) for device "/dev/ptmx" ( support for ptys, preferred is method openpty (...) ) Second) _GNU_SOURCE enable use of utmpx and wtmpx ( support for login recording, preferred is USE_LOGIN and syslogin_write_entry ) Three) ? at this time i don't know.