weak symbols and glibc versioning

Mike Frysinger vapier@gentoo.org
Wed Jan 6 18:56:00 GMT 2010


On Wednesday 06 January 2010 10:21:06 Ángel González wrote:
> I have a program for which I'd like to use "new" glibc features like
> accept4.
> Now, this program must work with an old glibc which doesn't provide
> those functions.

use a function pointer and during init, call dlopen() to search for the accept 
symbol in glibc.  if it isnt found, assign the function pointer to your local 
symbol.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20100106/1c218483/attachment.sig>


More information about the Libc-help mailing list