Browse Source

NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch from
Joerg Sonnenberger!


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

Douglas Gregor 14 years ago
parent
commit
0f565591bc
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

+ 4 - 1
lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

@@ -23,7 +23,10 @@ using namespace ento;
 static bool isArc4RandomAvailable(const ASTContext &Ctx) {
   const llvm::Triple &T = Ctx.Target.getTriple();
   return T.getVendor() == llvm::Triple::Apple ||
-         T.getOS() == llvm::Triple::FreeBSD;
+         T.getOS() == llvm::Triple::FreeBSD ||
+         T.getOS() == llvm::Triple::NetBSD ||
+         T.getOS() == llvm::Triple::OpenBSD ||
+         T.getOS() == llvm::Triple::DragonFly;
 }
 
 namespace {