The warning generated pre-rS366207 is actually a sign comparison warning:
error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare] if (strlcpy(buf, execpath, buflen) >= buflen)
Revert parts that affected other lines and just cast this to unsigned int.
The buflen < 0 -> EINVAL has been kept despite no longer serving any purposes w.r.t. sign-extension because I do believe it's the right thing to do: "The provided buffer was not the right size for the requested item."
The original warning is confirmed to still be gone with an env WARNS=6 make WITHOUT_TESTS=yes.