[libc-commits] [libc] [libc] Fix bug build (PR #113961)
Job Henandez Lara via libc-commits
libc-commits at lists.llvm.org
Mon Oct 28 14:31:34 PDT 2024
https://github.com/Jobhdez updated https://github.com/llvm/llvm-project/pull/113961
>From 211cb6e7617c3c339b5e088e392822b82015a2a4 Mon Sep 17 00:00:00 2001
From: Job Hernandez <jobhdezlara93 at gmail.com>
Date: Mon, 28 Oct 2024 14:14:10 -0700
Subject: [PATCH 1/4] fix build
---
libc/src/stdio/linux/CMakeLists.txt | 1 +
libc/src/stdio/linux/rename.cpp | 2 +-
libc/src/sys/mman/linux/CMakeLists.txt | 3 +--
libc/src/sys/mman/linux/shm_open.cpp | 2 +-
libc/src/sys/mman/shm_open.h | 2 +-
libc/test/src/sys/statvfs/linux/fstatvfs_test.cpp | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libc/src/stdio/linux/CMakeLists.txt b/libc/src/stdio/linux/CMakeLists.txt
index e81642dc6f01e6..1b2fcb33ce54d7 100644
--- a/libc/src/stdio/linux/CMakeLists.txt
+++ b/libc/src/stdio/linux/CMakeLists.txt
@@ -22,6 +22,7 @@ add_entrypoint_object(
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
libc.src.errno.errno
+ libc.hdr.fcntl_macros
)
add_entrypoint_object(
diff --git a/libc/src/stdio/linux/rename.cpp b/libc/src/stdio/linux/rename.cpp
index 69fd22720ed195..fbcb29be48f4e2 100644
--- a/libc/src/stdio/linux/rename.cpp
+++ b/libc/src/stdio/linux/rename.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/stdio/rename.h"
-#include "include/llvm-libc-macros/linux/fcntl-macros.h"
+#include "hdr/fcntl_macros.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/sys/mman/linux/CMakeLists.txt b/libc/src/sys/mman/linux/CMakeLists.txt
index 11188254cfbd45..47c16f79bc8d58 100644
--- a/libc/src/sys/mman/linux/CMakeLists.txt
+++ b/libc/src/sys/mman/linux/CMakeLists.txt
@@ -187,8 +187,7 @@ add_entrypoint_object(
../shm_open.h
DEPENDS
libc.src.fcntl.open
- libc.include.llvm-libc-macros.fcntl_macros
- libc.include.llvm-libc-types.mode_t
+ libc.hdr.types.mode_t
.shm_common
)
diff --git a/libc/src/sys/mman/linux/shm_open.cpp b/libc/src/sys/mman/linux/shm_open.cpp
index d235e57aefdeb1..11de482272d00a 100644
--- a/libc/src/sys/mman/linux/shm_open.cpp
+++ b/libc/src/sys/mman/linux/shm_open.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/sys/mman/shm_open.h"
-#include "llvm-libc-macros/fcntl-macros.h"
+#include "hdr/types/mode_t.h"
#include "src/__support/macros/config.h"
#include "src/fcntl/open.h"
#include "src/sys/mman/linux/shm_common.h"
diff --git a/libc/src/sys/mman/shm_open.h b/libc/src/sys/mman/shm_open.h
index c890304aa4acf9..5e5030b8fe2ecd 100644
--- a/libc/src/sys/mman/shm_open.h
+++ b/libc/src/sys/mman/shm_open.h
@@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_SYS_MMAN_SHM_OPEN_H
#include "src/__support/macros/config.h"
-#include <llvm-libc-types/mode_t.h>
+#include "hdr/types/mode_t.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/test/src/sys/statvfs/linux/fstatvfs_test.cpp b/libc/test/src/sys/statvfs/linux/fstatvfs_test.cpp
index 8cb5f867453e45..2f3e0b96ff0957 100644
--- a/libc/test/src/sys/statvfs/linux/fstatvfs_test.cpp
+++ b/libc/test/src/sys/statvfs/linux/fstatvfs_test.cpp
@@ -1,4 +1,4 @@
-#include "llvm-libc-macros/linux/fcntl-macros.h"
+#include "hdr/fcntl_macros.h"
#include "src/__support/macros/config.h"
#include "src/fcntl/open.h"
#include "src/sys/statvfs/fstatvfs.h"
>From 3c75bc407bbc01d099e59400940dd878cb4bd43a Mon Sep 17 00:00:00 2001
From: Job Hernandez <jobhdezlara93 at gmail.com>
Date: Mon, 28 Oct 2024 14:14:27 -0700
Subject: [PATCH 2/4] format code
---
libc/src/sys/mman/shm_open.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/sys/mman/shm_open.h b/libc/src/sys/mman/shm_open.h
index 5e5030b8fe2ecd..1872dd30cb6f5e 100644
--- a/libc/src/sys/mman/shm_open.h
+++ b/libc/src/sys/mman/shm_open.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_SYS_MMAN_SHM_OPEN_H
#define LLVM_LIBC_SRC_SYS_MMAN_SHM_OPEN_H
-#include "src/__support/macros/config.h"
#include "hdr/types/mode_t.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
>From dcdfd65c3188588efdc6ec231db59396d7b7c947 Mon Sep 17 00:00:00 2001
From: Job Hernandez <jobhdezlara93 at gmail.com>
Date: Mon, 28 Oct 2024 14:30:45 -0700
Subject: [PATCH 3/4] address review
---
libc/src/sys/stat/linux/CMakeLists.txt | 2 ++
libc/src/sys/stat/linux/chmod.cpp | 1 +
libc/src/sys/stat/linux/mkdir.cpp | 1 +
3 files changed, 4 insertions(+)
diff --git a/libc/src/sys/stat/linux/CMakeLists.txt b/libc/src/sys/stat/linux/CMakeLists.txt
index 7c9496b6b6e8c6..9aeb14636c2c1a 100644
--- a/libc/src/sys/stat/linux/CMakeLists.txt
+++ b/libc/src/sys/stat/linux/CMakeLists.txt
@@ -6,6 +6,7 @@ add_entrypoint_object(
../chmod.h
DEPENDS
libc.hdr.types.mode_t
+ libc.hdr.fcntl_macros
libc.include.sys_stat
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
@@ -47,6 +48,7 @@ add_entrypoint_object(
../mkdir.h
DEPENDS
libc.hdr.types.mode_t
+ libc.hdr.fcntl_macros
libc.include.sys_stat
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
diff --git a/libc/src/sys/stat/linux/chmod.cpp b/libc/src/sys/stat/linux/chmod.cpp
index 9d286039181810..2c3af6248627cd 100644
--- a/libc/src/sys/stat/linux/chmod.cpp
+++ b/libc/src/sys/stat/linux/chmod.cpp
@@ -12,6 +12,7 @@
#include "src/__support/common.h"
#include "hdr/types/mode_t.h"
+#include "hdr/fcntl_macros.h"
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include <sys/stat.h>
diff --git a/libc/src/sys/stat/linux/mkdir.cpp b/libc/src/sys/stat/linux/mkdir.cpp
index bd6efef858c7b6..bbe1f9e4233d7b 100644
--- a/libc/src/sys/stat/linux/mkdir.cpp
+++ b/libc/src/sys/stat/linux/mkdir.cpp
@@ -12,6 +12,7 @@
#include "src/__support/common.h"
#include "hdr/types/mode_t.h"
+#include "hdr/fcntl_macros.h"
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include <sys/stat.h>
>From 8f0789e17fd2b6a537be5690cff0ffc3578e69e8 Mon Sep 17 00:00:00 2001
From: Job Hernandez <jobhdezlara93 at gmail.com>
Date: Mon, 28 Oct 2024 14:31:18 -0700
Subject: [PATCH 4/4] format code
---
libc/src/sys/stat/linux/chmod.cpp | 2 +-
libc/src/sys/stat/linux/mkdir.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/src/sys/stat/linux/chmod.cpp b/libc/src/sys/stat/linux/chmod.cpp
index 2c3af6248627cd..57d5bae6b81915 100644
--- a/libc/src/sys/stat/linux/chmod.cpp
+++ b/libc/src/sys/stat/linux/chmod.cpp
@@ -11,8 +11,8 @@
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
-#include "hdr/types/mode_t.h"
#include "hdr/fcntl_macros.h"
+#include "hdr/types/mode_t.h"
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include <sys/stat.h>
diff --git a/libc/src/sys/stat/linux/mkdir.cpp b/libc/src/sys/stat/linux/mkdir.cpp
index bbe1f9e4233d7b..b319b5c8393de7 100644
--- a/libc/src/sys/stat/linux/mkdir.cpp
+++ b/libc/src/sys/stat/linux/mkdir.cpp
@@ -11,8 +11,8 @@
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
-#include "hdr/types/mode_t.h"
#include "hdr/fcntl_macros.h"
+#include "hdr/types/mode_t.h"
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include <sys/stat.h>
More information about the libc-commits
mailing list