* Package: app-misc/splitvt-1.6.6-r3 * Repository: gentoo * Maintainer: shell-tools@gentoo.org * USE: abi_x86_64 amd64 elibc_musl kernel_linux userland_GNU * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking splitvt-1.6.6.tar.gz to /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work >>> Unpacking splitvt_1.6.6-7.diff.gz to /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work >>> Source unpacked in /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work >>> Preparing source in /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work/splitvt-1.6.6 ... * Applying splitvt_1.6.6-7.diff ... [ ok ] * Applying 1.6.6-ldflags.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work/splitvt-1.6.6 ... Making configuration... config.c:32:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 32 | main(argc, argv) | ^~~~ config.c: In function ‘main’: config.c:116:7: warning: implicit declaration of function ‘grep’ [-Wimplicit-function-declaration] 116 | if ( grep(INCLUDE, "utmp.h", "ut_host") ) { | ^~~~ config.c:176:8: warning: implicit declaration of function ‘access’ [-Wimplicit-function-declaration] 176 | if ( (access("/var/run/utmp", (R_OK|W_OK)) == 0) && getuid() ) | ^~~~~~ config.c:176:54: warning: implicit declaration of function ‘getuid’ [-Wimplicit-function-declaration] 176 | if ( (access("/var/run/utmp", (R_OK|W_OK)) == 0) && getuid() ) | ^~~~~~ Aha! You are running Linux! Congratulations on the choice of a GNU generation. I will use sgttyb tty structures. I will use your sockets definition header. I will use wait4() instead of waitpid(). If installed set-uid root, this program will put entries for its windows in /var/run/utmp, and will also change ownership of the ttys it acquires to the user running this program. Done. Type 'make' to build >>> Source configured. >>> Compiling source in /var/tmp/portage/app-misc/splitvt-1.6.6-r3/work/splitvt-1.6.6 ... make -j1 x86_64-gentoo-linux-musl-gcc -O2 -pipe -march=native -DHAVE_UNISTD_H -DNEED_SELECT_H -DHAVE_WAIT4 -DSHELL=\"/bin/sh\" -DPTYCHAR=\"\" -DHEXDIGIT=\"\" -c -o splitvt.o splitvt.c x86_64-gentoo-linux-musl-gcc -O2 -pipe -march=native -DHAVE_UNISTD_H -DNEED_SELECT_H -DHAVE_WAIT4 -DSHELL=\"/bin/sh\" -DPTYCHAR=\"\" -DHEXDIGIT=\"\" -c -o misc.o misc.c misc.c: In function ‘dropctty’: misc.c:437:2: error: too many arguments to function ‘setpgrp’ 437 | setpgrp(0, 0); | ^~~~~~~ In file included from misc.c:7: /usr/include/unistd.h:142:7: note: declared here 142 | pid_t setpgrp(void); | ^~~~~~~ misc.c: In function ‘tty_sane’: misc.c:596:16: error: storage size of ‘temp_mode’ isn’t known 596 | struct sgttyb temp_mode; | ^~~~~~~~~ misc.c:601:16: error: ‘TIOCGETP’ undeclared (first use in this function); did you mean ‘TIOCGETD’? 601 | if (ioctl(fd, TIOCGETP, (char *) &temp_mode) < 0) | ^~~~~~~~ | TIOCGETD misc.c:601:16: note: each undeclared identifier is reported only once for each function it appears in misc.c:604:22: error: ‘ECHO’ undeclared (first use in this function) 604 | temp_mode.sg_flags|=ECHO; | ^~~~ misc.c:606:16: error: ‘TIOCSETP’ undeclared (first use in this function); did you mean ‘TIOCSETD’? 606 | if (ioctl(fd, TIOCSETP, (char *) &temp_mode) < 0) | ^~~~~~~~ | TIOCSETD misc.c: In function ‘tty_getmode’: misc.c:625:16: error: ‘TIOCGETP’ undeclared (first use in this function); did you mean ‘TIOCGETD’? 625 | if (ioctl(fd, TIOCGETP, (char *) &tty_mode) < 0) | ^~~~~~~~ | TIOCGETD misc.c: In function ‘tty_raw’: misc.c:641:16: error: storage size of ‘temp_mode’ isn’t known 641 | struct sgttyb temp_mode; | ^~~~~~~~~ misc.c:648:24: error: ‘RAW’ undeclared (first use in this function) 648 | temp_mode.sg_flags |= RAW; /* turn RAW mode on */ | ^~~ misc.c:649:25: error: ‘ECHO’ undeclared (first use in this function) 649 | temp_mode.sg_flags &= ~ECHO; /* turn ECHO off */ | ^~~~ misc.c:650:16: error: ‘TIOCSETP’ undeclared (first use in this function); did you mean ‘TIOCSETD’? 650 | if (ioctl(fd, TIOCSETP, (char *) &temp_mode) < 0) | ^~~~~~~~ | TIOCSETD misc.c: In function ‘tty_reset’: misc.c:667:16: error: ‘TIOCSETP’ undeclared (first use in this function); did you mean ‘TIOCSETD’? 667 | if (ioctl(fd, TIOCSETP, (char *) &tty_mode) < 0) | ^~~~~~~~ | TIOCSETD misc.c: At top level: misc.c:617:22: error: storage size of ‘tty_mode’ isn’t known 617 | static struct sgttyb tty_mode; /* save tty mode here */ | ^~~~~~~~ make: *** [: misc.o] Error 1 * ERROR: app-misc/splitvt-1.6.6-r3::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-misc/splitvt-1.6.6-r3::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-misc/splitvt-1.6.6-r3::gentoo'`. * The complete build log is located at '/var/log/portage/app-misc:splitvt-1.6.6-r3:20200314-174432.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-misc/splitvt-1.6.6-r3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-misc/splitvt-1.6.6-r3/temp/environment'. * Working directory: '/var/tmp/portage/app-misc/splitvt-1.6.6-r3/work/splitvt-1.6.6' * S: '/var/tmp/portage/app-misc/splitvt-1.6.6-r3/work/splitvt-1.6.6'