[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6349) Compilation of /libraries/liblutil/getpeerid.c



Full_Name: Peter Häring
Version: 2.4.16
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (95.208.246.19)


System: Linux 2.6.31.3 (headers for glibc)
        glibc 2.10.1
        gcc 4.4.1

Compilation of /libraries/liblutil/getpeerid.c says in Line 65: size of peercred
unknown. Indeed, the struct ucred is never defined.

There is a definition in /usr/include/bits/socket.h, but this needs that
__USE_GNU is defined.

My workaround: #define __USE_GNU at the top of the file.
This doesn't work, because the definition of fopencookie() in
/usr/include/stdio.h then goes wrong (Bug in glibc?) The man page of
fopencookie() say to define _GNU_SOURCE, so I defined that additionally.
With both defines, compilation works and all tests succeed.