Fix build on Solaris 11.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 8 Oct 2013 16:12:58 +0000 (16:12 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 8 Oct 2013 16:12:58 +0000 (16:12 +0000)
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’

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192185 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/Program.inc
lib/Support/Unix/Unix.h

index 2822e912c81402cbfd71a5310d04af8e06762819..78b29714549fcaa076a62d44bf733e68a4ecec8e 100644 (file)
@@ -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;
index dd11c04b32bd32c047b6f3b32c38f99df8bd3ca5..ba688e382175d9c8fc5711c55d212ee09215e10e 100644 (file)
 # include <sys/wait.h>
 #endif
 
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
 #ifndef WEXITSTATUS
 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 #endif