Misc fixes to fix tests on OpenBSD, per email to cfe-commits.  Patches 
by Jonathan Gray and Krister Walfridsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75268 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c
index 5e4222b..eff8dbb 100644
--- a/test/Analysis/casts.c
+++ b/test/Analysis/casts.c
@@ -4,6 +4,8 @@
 // 'struct sockaddr *'. 
 
 #include <sys/socket.h>
+#include <sys/types.h>
+
 void f(int sock) {
   struct sockaddr_storage storage;
   struct sockaddr* sockaddr = (struct sockaddr*)&storage;
diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c
index 5d7b0b0..5d02418 100644
--- a/test/Driver/dragonfly.c
+++ b/test/Driver/dragonfly.c
@@ -1,6 +1,6 @@
 // RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log &&
 // RUN: grep 'clang-cc" "-triple" "x86_64-pc-dragonfly"' %t.log &&
 // RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
-// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log &&
 // RUN: true
 
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c
index 91258d9..f2db110 100644
--- a/test/Driver/freebsd.c
+++ b/test/Driver/freebsd.c
@@ -2,6 +2,6 @@
 // RUN: cat %t.log &&
 // RUN: grep 'clang-cc" "-triple" "powerpc64-pc-freebsd8"' %t.log &&
 // RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
-// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log &&
 // RUN: true
 
diff --git a/test/Sema/format-attr-pr4470.c b/test/Sema/format-attr-pr4470.c
index cba3adf..c03c573 100644
--- a/test/Sema/format-attr-pr4470.c
+++ b/test/Sema/format-attr-pr4470.c
@@ -1,6 +1,7 @@
 // RUN: clang-cc -fsyntax-only -verify -Wformat=2 %s
 
 #include <stdio.h>
+#include <stdarg.h>
 
 const char *foo(const char *format) __attribute__((format_arg(1)));