On Minix 3.1.8, there are several issues: 1) openpty() exists in libutil, but its declaration in <util.h> is #ifdefed out. 2) <util.h> is not self-contained, you need to write #include <stdarg.h> #define _BSD_VA_LIST_ va_list #include <util.h> 3) openpty() fails with error code ENOENT. 4) When I add this code to posix_openpt.c
# if defined __minix if (master < 0) { /* Try various master names of Minix: /dev/pty[p-q][0-9a-f] */ int char1; int char2; for (char1 = 'p'; char1 <= 'q'; char1++) for (char2 = '0'; char2 <= 'f'; (char2 == '9' ? char2 = 'a' : char2++)) { char master_name[32]; sprintf (master_name, "/dev/pty%c%c", char1, char2); master = open (master_name, O_RDONLY); if (master >= 0) return master; } } # endif every open() call fails with EIO. In summary, ttys on Minix appear to be completely broken, an no-one cares. Bruno -- In memoriam Eduard Brücklmeier <http://en.wikipedia.org/wiki/Eduard_Brücklmeier>