-// RUN: %clangxx -O0 -g %s -o %t && %run %t
+// RUN: %clangxx -O0 -g %s -o %t -lcrypt && %run %t
-// crypt is missing from Android.
-// UNSUPPORTED: android
+// crypt() is missing from Android and -lcrypt from darwin.
+// UNSUPPORTED: android, darwin
#include <assert.h>
#include <unistd.h>
if config.host_os in ['Linux']:
extra_link_flags += ["-ldl"]
-if config.host_os in ['Linux', 'NetBSD', 'FreeBSD']:
- extra_link_flags += ["-lcrypt"]
-
clang_cflags = config.debug_info_flags + tool_cflags + [config.target_cflags]
clang_cflags += extra_link_flags
clang_cxxflags = config.cxx_mode_flags + clang_cflags