Thanks, Amadeusz. As you instructed, I commented out the lines in utmp.c which referenced ut_exit (lines #384-385) and then ran make again. Unfortunately, it failed with a different error:
$ make
gcc -c -iquote. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -g -O2 -Wall -Wextra -std=c11 utmp.c -o utmp.o
utmp.c:358:21: warning: incompatible integer to pointer conversion passing 'slot_t' (aka 'int') to parameter of type 'const char *' [-Wint-conversion]
strncpy(u.ut_line, slot, sizeof(u.ut_line));
^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/secure/_string.h:119:34: note: expanded from
macro 'strncpy'
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))
^~~
utmp.c:363:58: warning: unused parameter 'host' [-Wunused-parameter]
static int pututslot(slot_t slot, struct utmpx *u, char *host, Window *win)
^
utmp.c:363:72: warning: unused parameter 'win' [-Wunused-parameter]
static int pututslot(slot_t slot, struct utmpx *u, char *host, Window *win)
^
utmp.c:406:9: warning: incompatible pointer to integer conversion returning 'char *' from a function with result type 'slot_t' (aka 'int') [-Wint-conversion]
return stripdev(nam);
^~~~~~~~~~~~~
4 warnings generated.
gcc -c -iquote. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -g -O2 -Wall -Wextra -std=c11 help.c -o help.o
gcc -c -iquote. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -g -O2 -Wall -Wextra -std=c11 termcap.c -o termcap.o
gcc -c -iquote. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -g -O2 -Wall -Wextra -std=c11 input.c -o input.o
gcc -c -iquote. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -g -O2 -Wall -Wextra -std=c11 attacher.c -o attacher.o
attacher.c:457:14: error: use of undeclared identifier '_NSIG'
void (*sigs[_NSIG - 1]) (int);
^
attacher.c:459:22: error: use of undeclared identifier '_NSIG'
for (sig = 1; sig < _NSIG - 1; sig++)
^
attacher.c:467:22: error: use of undeclared identifier '_NSIG'
for (sig = 1; sig < - 1; sig++) {
^
3 errors generated.
make: *** [attacher.o] Error 1