[llvm] r192185 - Fix build on Solaris 11.

Rafael Espindola rafael.espindola at gmail.com
Tue Oct 8 09:12:58 PDT 2013


Author: rafael
Date: Tue Oct  8 11:12:58 2013
New Revision: 192185

URL: http://llvm.org/viewvc/llvm-project?rev=192185&view=rev
Log:
Fix build on Solaris 11.

Patch by Vladimir Voskresensky. The erros were:

Path.inc:274:3: error: ‘Dl_info’ was not declared in this scope
...

and

usr/include/spawn.h:52:14: error: expected ‘,’ or ‘...’ before ‘argv’

Modified:
    llvm/trunk/lib/Support/Unix/Program.inc
    llvm/trunk/lib/Support/Unix/Unix.h

Modified: llvm/trunk/lib/Support/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Program.inc?rev=192185&r1=192184&r2=192185&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Program.inc (original)
+++ llvm/trunk/lib/Support/Unix/Program.inc Tue Oct  8 11:12:58 2013
@@ -36,6 +36,9 @@
 #include <unistd.h>
 #endif
 #ifdef HAVE_POSIX_SPAWN
+#ifdef __sun__
+#define  _RESTRICT_KYWD
+#endif
 #include <spawn.h>
 #if !defined(__APPLE__)
   extern char **environ;

Modified: llvm/trunk/lib/Support/Unix/Unix.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Unix.h?rev=192185&r1=192184&r2=192185&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Unix.h (original)
+++ llvm/trunk/lib/Support/Unix/Unix.h Tue Oct  8 11:12:58 2013
@@ -47,6 +47,10 @@
 # include <sys/wait.h>
 #endif
 
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
 #ifndef WEXITSTATUS
 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 #endif





More information about the llvm-commits mailing list