[llvm-commits] [PATCH] fix build on g++-4.3

Chris Lattner clattner at apple.com
Fri Apr 4 08:20:46 PDT 2008


On Apr 4, 2008, at 4:02 AM, Török Edwin wrote:

> Hi,
>
> Target.cpp doesn't build with g++-4.3, attached patch fixes it. Ok to
> commit?

Yep, please do!

-Chris

>
>
> make[2]: Entering directory `/home/edwin/llvm-svn/llvm/lib/Target'
> llvm[2]: Compiling Target.cpp for Release build
> Target.cpp: In function ‘char*
> LLVMCopyStringRepOfTargetData(LLVMOpaqueTargetData*)’:
> Target.cpp:31: error: ‘strdup’ was not declared in this scope
> make[2]: *** [/home/edwin/llvm-svn/llvm/lib/Target/Release/Target.o]  
> Error 1
>
> Best regards,
> --Edwin
> Index: lib/Target/Target.cpp
> ===================================================================
> --- lib/Target/Target.cpp	(revision 49212)
> +++ lib/Target/Target.cpp	(working copy)
> @@ -15,6 +15,7 @@
> #include "llvm-c/Target.h"
> #include "llvm/PassManager.h"
> #include "llvm/Target/TargetData.h"
> +#include <cstring>
>
> using namespace llvm;
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list