The Samba-Bugzilla – Bug 7754
samba uses index(), marked as legacy
Last modified: 2010-10-27 13:50:31 UTC
The function index() is marked as LEGACY in POSIX.1-2001. POSIX.1-2008 removes the specifications of index() and rindex(), recommending strchr(3) and strrchr(3) instead.
This is an issue when trying to compile samba against uCLibc as it doesn't provide these legacy functions by default.
I'll attach a simple patch that changes the code to use strchr() instead. This patch is taken from buildroot. It would be nice to see it going upstream so that buildroot doesn't need to patch samba any longer.
Created attachment 6034 [details]
patch to replace use of index() with strchr()
Oh my god. What horrible code in here....
I'll fix this asap !
This code is horrible and needs a rewrite, but the fix in the patch is simple and correct - applied for 3.6.0.