[libc-commits] [libc] [libc] fix unit tests (PR #75361)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Wed Dec 13 09:19:53 PST 2023
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/75361
Fixes #75261
>From bd9b1a1bad3c2e4d1e6a47e7108371a1ecf616dd Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Wed, 13 Dec 2023 09:18:51 -0800
Subject: [PATCH] [libc] fix unit tests
Fixes #75261
---
libc/test/src/fcntl/creat_test.cpp | 2 ++
libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp | 1 +
2 files changed, 3 insertions(+)
diff --git a/libc/test/src/fcntl/creat_test.cpp b/libc/test/src/fcntl/creat_test.cpp
index ca926b30e62faf..ef30d8862c45f2 100644
--- a/libc/test/src/fcntl/creat_test.cpp
+++ b/libc/test/src/fcntl/creat_test.cpp
@@ -13,6 +13,8 @@
#include "test/UnitTest/ErrnoSetterMatcher.h"
#include "test/UnitTest/Test.h"
+#include <sys/stat.h>
+
TEST(LlvmLibcCreatTest, CreatAndOpen) {
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
constexpr const char *TEST_FILE = "testdata/creat.test";
diff --git a/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp b/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
index 7e6bb0aaca9251..0870deeeb5d801 100644
--- a/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
+++ b/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
@@ -17,6 +17,7 @@
#include "test/UnitTest/Test.h"
#include <sys/resource.h>
+#include <sys/stat.h>
TEST(LlvmLibcResourceLimitsTest, SetNoFileLimit) {
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
More information about the libc-commits
mailing list