[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 10:08:48 PDT 2008
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
OK, got a working patch. It's not easy to make it both portable (only
define _GNU_SOURCE if __GLIBC__ is defined) and pinpointed (only used for
sys/socket.h), since sys/socket.h is transitively included by countless
other standard headers. I have played around with it for an hour, and
finally gave up and just applied this rather blunt one:
--- trunk~/scheduler/auth.c 2008-03-20 20:58:16.000000000 +0000
+++ trunk/scheduler/auth.c 2008-06-12 17:06:34.000000000 +0000
@@ -54,6 +54,8 @@
* Include necessary headers...
*/
+#define _GNU_SOURCE /* for struct ucred on glibc >= 2.8 */
+
#include "cupsd.h"
#include <grp.h>
#ifdef HAVE_SHADOW_H
Link: http://www.cups.org/str.php?L2860
Version: 1.3.7
More information about the cups
mailing list