Patch for renaming sk_new()
The sk_new() function within bird is identically named to an openssl function. We needed to link against openssl to support BGPSEC, which Michael Baer wrote you about back in March, so I wrote a short patch to rename sk_new() to sk_new_sock() instead. It's attached below and I'd love it if it could be applied to the primary repository. Thanks and let me know if this would cause a problem! -- Wes Hardaker My Pictures: http://capturedonearth.com/ My Thoughts: http://pontifications.hardakers.net/
On Fri, Jun 08, 2012 at 02:38:45PM -0700, Wes Hardaker wrote:
The sk_new() function within bird is identically named to an openssl function. We needed to link against openssl to support BGPSEC, which Michael Baer wrote you about back in March, so I wrote a short patch to rename sk_new() to sk_new_sock() instead. It's attached below and I'd love it if it could be applied to the primary repository.
Hmm, using such generic prefix like sk_ in public library like OpenSSL is definitelyt not a good idea on their side, but i guess we have to make a change to be able to link to it. I would prefer less intrusive patch like the attached one (keeping sk_new() name using macro). Try it and let us know whether it is OK for your purpose (you have to just #undef sk_new before including OpenSSL in files that use OpenSSL). -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Ondrej Zajicek <santiago@crfreenet.org> writes: Sorry for the delay (I went on vacation shortly after sending that last patch).
Hmm, using such generic prefix like sk_ in public library like OpenSSL is definitelyt not a good idea on their side, but i guess we have to make a change to be able to link to it.
Well, I don't think they'd accept a change to their (long) published API, so I didn't submit one to them.
I would prefer less intrusive patch like the attached one (keeping sk_new() name using macro). Try it and let us know whether it is OK for your purpose (you have to just #undef sk_new before including OpenSSL in files that use OpenSSL).
You didn't attach the patch though. A macro would certainly be ok, until you ran into the case where you needed both the openssl function and the macro in the same file, but that's unlikely. Personally, I think it'd be better to rename it entirely to something new like my patch did as it seems cleaner and less confusing (especially when debugging). There aren't that many files to change. But the choice, of course, is yours. -- Wes Hardaker My Pictures: http://capturedonearth.com/ My Thoughts: http://pontifications.hardakers.net/
participants (2)
-
Ondrej Zajicek -
Wes Hardaker