Build of cpulimit with musl toolchain

The build took 00h 00m 59s and was NOT successful.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
1,348 ansic
261 sh
40 makefile
1,649 total

The process tree of the build process is here.

List of Errors

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

There were existing files in /sysroot, using those
# /sysroot/lib
# /sysroot/share
# /sysroot/bin
# /sysroot/include
# /sysroot/libexec

CMD: sudo -u tuscan PATH=/sysroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=clang CXX=clang++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: cpulimit 20160304-1 (Tue Apr 4 23:11:32 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# cd src && make all
# make[1]: Entering directory '/tmp/cpulimit/src/cpulimit-20160304/src'
# clang -c list.c
# clang -c process_iterator.c
# clang -c process_group.c
# process_group.c:64:15: warning: implicit declaration of function 'basename' is invalid in C99 [-Wimplicit-function-declaration]
# if (strncmp(basename(proc.command), process_name, strlen(process_name))==0 && kill(pid,SIGCONT)==0) {
# ^
# process_group.c:64:15: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
# if (strncmp(basename(proc.command), process_name, strlen(process_name))==0 && kill(pid,SIGCONT)==0) {
# ^~~~~~~~~~~~~~~~~~~~~~
# /sysroot/include/string.h:38:26: note: passing argument to parameter here
# int strncmp (const char *, const char *, size_t);
# ^
# 2 warnings generated.
# clang -o cpulimit cpulimit.c list.o process_iterator.o process_group.o
# cpulimit.c:41:10: fatal error: 'sys/sysctl.h' file not found
# #include
# ^
# 1 error generated.
# make[1]: *** [Makefile:15: cpulimit] Error 1
# make[1]: Leaving directory '/tmp/cpulimit/src/cpulimit-20160304/src'
# make: *** [Makefile:4: all] Error 2
# ==> ERROR: A failure occurred in build().
# Aborting...