[cups.bugs] [MOD] STR #2860: Fails to build with glibc 2.8: "struct ucred" needs _GNU_SOURCE

martin.pitt.canonical martin.pitt at canonical.com
Thu Jun 12 09:32:28 PDT 2008


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Starting with glibc 2.8.0, "struct ucred" is only available when defining
-D_GNU_SOURCE. Upstream changed that in [1] with the commit log "clean up
namespace".

Thus cups fails to build now:

Compiling auth.c...
auth.c: In function ‘cupsdAuthorize’:
auth.c:484: error: storage size of ‘peercred’ isn’t known
auth.c:484: warning: unused variable ‘peercred’
make[2]: *** [auth.o] Error 1

Including -D_GNU_SOURCE in CFLAGS helps, but is just a workaround. I'll
work on a real patch.

[1]
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/bits/socket.h.diff?r1=1.60&r2=1.61&cvsroot=glibc

Link: http://www.cups.org/str.php?L2860
Version: 1.3.7





More information about the cups-devel mailing list