setres[gu]id implicit decl warning on Linux glibc

Darren Tucker dtucker at zip.com.au
Fri Aug 15 09:39:58 EST 2003


Pekka Savola wrote:
[snip]
> uidswap.c: In function `permanently_set_uid':
> uidswap.c:155: warning: implicit declaration of function `setresgid'
> uidswap.c:168: warning: implicit declaration of function `setresuid'
[snip]
> Just letting you folks know, if someone has a nice autoconf trick handy
> (for example) or is bothered by this warning..

You can check check the declaration before searching libraries for the
function, eg:

AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])

I don't think it's worth the hassle to just suppress a warning as it will
prevent the function from being used.

(The strsep check is there because it resolves an actual problem on AIX).

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list