Fix Coverity CID #56279: Copy-paste error

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix Coverity CID #56276: Unchecked return value from setsockopt()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Add OpenBSD strlcpy() and strlcat()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Refactor strcpy()/strcat() to use safe string functions from OpenBSD

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Refactor dep file generation using fancy new GCC feature.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>