The build failure is with lnx_kbd.c . An implicit declaration of the function getpgid is treated as an error. It seems to be a missing include, because POSIX and uclibc have it.
Steps to Reproduce:
1. emerge -u1 x11-drivers/xf86-input-keyboard
* ERROR: x11-drivers/xf86-input-keyboard-1.8.1::gentoo failed (compile phase):
* emake failed
xf86-input-keyboard updated on system
Created attachment 418658 [details]
Created attachment 418660 [details]
build.log from emerge
Adding <unistd.h> does not help unfortunately. The implicit declaration still exists. It still exists with a simple test C program. To get rid of it, I must avoid unistd.h at all costs, as in my minimal test:
extern pid_t getpgid(pid_t id);
int main(int argc, char** argv)
This is something not possible with xf86-input-keyboard source. However, its configure checks for -Werror=implicit, making the implicit declaration an error. In case of uclibc, which has a getpgid symbol, we can simply revert back to a warning with append-cflag in the ebuild. Ugly, but works.
Created attachment 424440 [details, diff]
On uclibc, disable -Werror=implicit-function-declaration with append-cflags
packages shouldn't be building with -Werror flags in the first place, so the fix is to disable all of those for this package
Created attachment 424662 [details, diff]
Simpler ebuild patch
I found out the configure script provides a way to disable all those errors, so this new ebuild patch uses the option.
This should be fixed by
Author: Matt Turner <email@example.com>
Date: Sun Jan 29 11:30:39 2017 -0800
xorg-2.eclass: Use --disable-selective-werror.