libc: enable sprintf FORTIFY_SOURCE under clang

clang doesn't support __builtin_va_arg_pack(), so we have
to use #define instead.

Change-Id: I2ee75e6267d60cdf997fee6b9b0547bf68f062a1
diff --git a/tests/fortify1_test_clang.cpp b/tests/fortify1_test_clang.cpp
index fed9f13..b4ded33 100644
--- a/tests/fortify1_test_clang.cpp
+++ b/tests/fortify1_test_clang.cpp
@@ -92,6 +92,20 @@
 
 #endif
 
+TEST(Fortify1_Clang_DeathTest, sprintf_fortified) {
+  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+  char buf[10];
+  char source_buf[15];
+  memcpy(source_buf, "12345678901234", 15);
+  ASSERT_EXIT(sprintf(buf, "%s", source_buf), testing::KilledBySignal(SIGABRT), "");
+}
+
+TEST(Fortify1_Clang_DeathTest, sprintf2_fortified) {
+  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+  char buf[5];
+  ASSERT_EXIT(sprintf(buf, "aaaaa"), testing::KilledBySignal(SIGABRT), "");
+}
+
 TEST(Fortify1_Clang_DeathTest, strncat_fortified) {
   ::testing::FLAGS_gtest_death_test_style = "threadsafe";
   char buf[10];