[PATCH libX11] configure: check if issetugid is declared

Alan Coopersmith alan.coopersmith at oracle.com
Mon Apr 30 15:56:08 PDT 2012


On 04/29/12 07:43 AM, Julien Cristau wrote:
> GNU/kFreeBSD has issetugid in libc (for legacy apps?), but doesn't
> declare it anywhere, causing gcc to error out with
> -Werror=implicit-function-declaration.  Use AC_CHECK_DECL in addition to
> AC_CHECK_FUNC so we disable this code instead of failing to build it.
> 
> Debian bug#669670 <http://bugs.debian.org/669670>
> 
> Signed-off-by: Julien Cristau <jcristau at debian.org>
> ---
>  configure.ac |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index aaec968..c91234f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -223,8 +223,9 @@ AC_CHECK_HEADERS([sys/select.h])
>  AC_CHECK_FUNCS([strtol seteuid])
>  # Used in lcFile.c (see also --enable-xlocaledir settings below)
>  XLOCALEDIR_IS_SAFE="no"
> -AC_CHECK_FUNC([issetugid], [XLOCALEDIR_IS_SAFE="yes"]
> -	AC_DEFINE(HASSETUGID,1,[Has issetugid() function]))
> +AC_CHECK_DECL([issetugid],
> +	AC_CHECK_FUNC([issetugid], [XLOCALEDIR_IS_SAFE="yes"]
> +		AC_DEFINE(HASSETUGID,1,[Has issetugid() function])))
>  AC_CHECK_FUNC([getresuid], [XLOCALEDIR_IS_SAFE="yes"]
>  	AC_DEFINE(HASGETRESUID,1,[Has getresuid() & getresgid() functions]))
>  # Used in Font.c

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

(and it seems to work as expected on Solaris)

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list