CUPS 1.3.0 ucred.h and autoconf problem under FreeBSD 6.2

Alessandro Dellavedova alessandro.dellavedova at gmail.com
Mon Aug 27 07:48:18 PDT 2007


Dear Sirs,

I'm trying to compile CUPS 1.3.0 under FreeBSD 6.2, but the configure output underlines a problem with /sys/ucred.h

./configure --disable-gssapi

<SNIP>
checking sys/ucred.h usability... no
checking sys/ucred.h presence... yes
configure: WARNING: sys/ucred.h: present but cannot be compiled
configure: WARNING: sys/ucred.h:     check for missing prerequisite headers?
configure: WARNING: sys/ucred.h: see the Autoconf documentation
configure: WARNING: sys/ucred.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/ucred.h: proceeding with the preprocessor's result
configure: WARNING: sys/ucred.h: in the future, the compiler will take precedence
checking for sys/ucred.h... yes
<SNIP>

And a make fails with the following error:

Compiling auth.c...
In file included from cupsd.h:127,
                 from auth.c:57:
job.h:60: error: syntax error before "krb5_ccache"
In file included from auth.c:57:
cupsd.h:163: error: syntax error before "KerberosContext"
cupsd.h:163: warning: type defaults to `int' in declaration of `KerberosContext'
cupsd.h:163: warning: data definition has no type or storage class
In file included from auth.c:87:
/usr/include/sys/ucred.h:71: error: `NGROUPS' undeclared here (not in a function)
*** Error code 1


I'm not an autoconf wizard, so I solved it by editing the /scheduler/auth.c source in this way:

#ifdef __FreeBSD__
# include <sys/param.h>
#endif
#ifdef HAVE_SYS_UCRED_H
#  include <sys/ucred.h>
typedef struct xucred cupsd_ucred_t;
#  define CUPSD_UCRED_UID(c) (c).cr_uid
#else
typedef struct ucred cupsd_ucred_t;
#  define CUPSD_UCRED_UID(c) (c).uid
#endif /* HAVE_SYS_UCRED_H */

I'm sure that an autoconf wizard can solve this in a much more clean way.

Ciao,

Alessandro





More information about the cups-devel mailing list