[Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9)
Norbert Sendetzky
norbert at linuxnetworks.de
Mon Jun 23 23:28:22 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 23 June 2003 21:43, Christof Meerwald wrote:
> > Well, Logger will call the real pthread_self() function and not the dummy
> > (I hope).
>
> There is no other (or real) pthread_self function - pdns_recursor doesn't
> link with -lpthread. And even if it would, I think it would still call the
> locally overridden pthread_self.
Hmm, that's funny. I thought PDNS is using threads. But you may be right that
the pthread_self function may be overwritten. I simply don't know, what
extern "C" is really doing if you supply a function with a body.
> > To remove the warning, simply change the line to:
> > pthread_t pthread_self(void){return (pthread_t) 0;}
>
> I know, but it's not portable - I don't know that pthread_t really is an
> integer, it could also be a struct.
Yes, that's not the most portable way, but it is ok in this case because
pthread_t is a long integer if I remember correctly. Before we are arguing
about the cast, it would be better to know what the "extern" thing is really
doing.
Norbert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+92LnxMLs5v5/7eARAluoAJ0Rih7jmw7/qaDc5I5l6zr3HbkmVQCfWmeT
DfcNPDUXNpBLM3rMH1G5lpk=
=23FR
-----END PGP SIGNATURE-----
More information about the Pdns-dev
mailing list