xdm getpwnam pwd.h conflict

Jeremy Huddleston jeremyhu at berkeley.edu
Mon Mar 10 22:37:59 PDT 2008


Bumping this since I haven't gotten any response yet, and I'd like to  
figure out a good solution...

--Jeremy

On Feb 24, 2008, at 14:41, Jeremy Huddleston wrote:

> Hi Alan,
>
> When compiling a recent version of xdm, I noticed the following  
> linking failure when linking libXdmGreet (on darwin):
> ld: duplicate symbol ___xdm_getpwnam in .libs/greet.o and .libs/ 
> Login.o
>
> I git-bisect'd it down to this commit of yours (specifically, the  
> inclusion of <pwd.h> in this patch):
> http://cgit.freedesktop.org/xorg/app/xdm/commit/?id=6e2362e825dfec6df73f1338088a850225ed92d2
>
> The following exists in our <pwd.h>:
> struct passwd   *getpwnam(const char *);
>
> However, looking at the pre-processed C, this gets pre-processed into:
> struct passwd *(*__xdm_getpwnam)(const char *);
>
> due to this:
> greet.h:#define	getpwnam	(*__xdm_getpwnam)
>
> Simply #include-ing <pwd.h> at the top of greet.h allows it to be  
> processes first, thus compilation/linking succeeds...  but while  
> that's good enough for a workaround, it isn't the best solution.
>
> What are your thoughts?
>
> --Jeremy_______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080310/0a7f4fa8/attachment.bin>


More information about the xorg mailing list