diff -urN cui139/term.c cui140/term.c --- cui139/term.c Sat Apr 26 22:00:00 2014 +++ cui140/term.c Wed Sep 30 00:00:00 2015 @@ -18,7 +18,8 @@ #include #include -#ifdef __FreeBSD__ +#if defined(__linux__) +#else /* __FreeBSD__ */ #include #endif @@ -583,14 +584,14 @@ signal(SIGCHLD, sig_hdr); first = FALSE; } -#if defined(__FreeBSD__) - if((ret = forkpty(&master, NULL, NULL, NULL)) < 0) ERR("forkpy"); -#else /* defined(__linux__) */ +#if defined(__linux__) int slave; char *name; if((master = posix_openpt(O_RDWR)) < 0) ERR("posix_openpt"); if((ret = fork()) < 0) ERR("fork"); +#else /* __FreeBSD__ */ + if((ret = forkpty(&master, NULL, NULL, NULL)) < 0) ERR("forkpy"); #endif if(ret != 0){ /* parent */ p->sock = master;