[LLVMbugs] llvm-gcc4.2-2.6.source fails to build out of the box

Duncan Sands baldrick at free.fr
Thu Jan 7 03:41:28 PST 2010


Hi Mark, does the following patch fix it for you?

Index: strsignal.c
===================================================================
--- strsignal.c	(revision 92897)
+++ strsignal.c	(working copy)
@@ -404,12 +404,11 @@

  #ifndef HAVE_STRSIGNAL

-const char *
+char *
  strsignal (int signo)
  {
-  const char *msg;
+  char *msg;
    static char buf[32];
-
  #ifndef HAVE_SYS_SIGLIST

    if (signal_names == NULL)
@@ -428,12 +427,12 @@
      {
        /* In range, but no sys_siglist or no entry at this index. */
        sprintf (buf, "Signal %d", signo);
-      msg = (const char *) buf;
+      msg = buf;
      }
    else
      {
        /* In range, and a valid message.  Just return the message. */
-      msg = (const char *) sys_siglist[signo];
+      msg = (char *) sys_siglist[signo];
      }

    return (msg);



More information about the llvm-bugs mailing list