[lldb-dev] strncmp() compiler issue in source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp

Bill Wendling wendling at apple.com
Wed Jul 7 11:06:48 PDT 2010


On Jul 6, 2010, at 6:53 PM, sales wrote:

> Hi,
> 
> On ubuntu gcc-4.4.3 has an issue with strncmp()  in 
> source/Plugins/SymbolFile/DWARFDWARFDefines.cpp.
> The quick fix is to  add #include <string.h> in addtion to the  #include 
> <string> .
> Better way might be to avoid the strncmp() and use string::compare()
> 
> Thanks,
> Pawel
> 
> -------------------------cut here K 
> ----------------------------------------------------------------
> Index: DWARFDefines.cpp
> ===================================================================
> --- DWARFDefines.cpp    (revision 107733)
> +++ DWARFDefines.cpp    (working copy)
> @@ -10,6 +10,7 @@
>  #include "DWARFDefines.h"
>  #include <stdio.h>
>  #include <string>
> +#include <string.h>

Might be better to use the C++ header "<cstring>" to get the non-C++ string header.

-bw





More information about the lldb-dev mailing list