xdm getpwnam pwd.h conflict
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...
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/
> I git-bisect'd it down to this commit of yours (specifically, the
> inclusion of <pwd.h> in this patch):
> 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?
> xorg mailing list
> xorg at lists.freedesktop.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3040 bytes
Desc: not available
More information about the xorg