[sslh] OS X 10.6 does not know memem

Yves Rutschle yves at rutschle.net
Sun Mar 30 17:47:12 CEST 2014


On Thu, Mar 27, 2014 at 05:02:38AM +0100, Kai Ellinger wrote:
> Undefined symbols:
>   "_memmem", referenced from:
>       _is_xmpp_protocol in probe.o
>       _is_http_protocol in probe.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [sslh-fork] Error 1
> 
> I manually changed back to strstr and it worked.
> 
> Question is whether one can get memmem on OS X 10.6 as well.

Ah, apparement memmem is a GNU extension... which I guess
wasn't in older FreeBSD (or whatever libc it is MacOS uses).
Is it possible to link against glibc instead of the native
libc?

IIRC we need memmem() instead of strstr() for possible
security issues if we receive packets with zeroes in them.
And I'd rather not re-code memmem(), as it seems GNU took
years to get it right :-)

(or I could check the license and see if I can lift it from
glibc).

Y.



More information about the sslh mailing list