[libc-commits] [libc] [libc] Add chown and getgid implementations (PR #166434)
via libc-commits
libc-commits at lists.llvm.org
Tue Nov 4 11:47:09 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libc/hdr/types/gid_t.h libc/src/unistd/chown.h libc/src/unistd/getgid.h libc/src/unistd/linux/chown.cpp libc/src/unistd/linux/getgid.cpp libc/test/src/unistd/chown_test.cpp libc/test/src/unistd/getgid_test.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/unistd/chown.h b/libc/src/unistd/chown.h
index e5cae67c7..84a8eba2c 100644
--- a/libc/src/unistd/chown.h
+++ b/libc/src/unistd/chown.h
@@ -9,9 +9,9 @@
#ifndef LLVM_LIBC_SRC_UNISTD_CHOWN_H
#define LLVM_LIBC_SRC_UNISTD_CHOWN_H
-#include "src/__support/macros/config.h"
-#include "hdr/types/uid_t.h"
#include "hdr/types/gid_t.h"
+#include "hdr/types/uid_t.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/test/src/unistd/chown_test.cpp b/libc/test/src/unistd/chown_test.cpp
index caa1c3deb..8b1f78327 100644
--- a/libc/test/src/unistd/chown_test.cpp
+++ b/libc/test/src/unistd/chown_test.cpp
@@ -9,9 +9,9 @@
#include "src/fcntl/open.h"
#include "src/unistd/chown.h"
#include "src/unistd/close.h"
-#include "src/unistd/unlink.h"
-#include "src/unistd/getuid.h"
#include "src/unistd/getgid.h"
+#include "src/unistd/getuid.h"
+#include "src/unistd/unlink.h"
#include "test/UnitTest/ErrnoCheckingTest.h"
#include "test/UnitTest/ErrnoSetterMatcher.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/166434
More information about the libc-commits
mailing list