Im trying to integrate a third-party library (libwebsockets) into an application.
Now it turned out libwebsockets had the function:
unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
And the application had a similiar function
char *SHA1(char *string)
Unfortunately libwebsockts during execution used the function in the app instead of its own.
Now what is the canonical way of the detecting situations like this, to make it easier to integrate a 3pp-lib (found this clash after step-debuging alot of lines of code)? (Im using visual studio if there is tricks available in there)
Is it bad design in the app (and/or) the lib that allows this to happen?
SHA1()
can ever become a call to your 1-argument version.