Skip to content

[clang] Include <stddef.h> for size_t #139496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

atetubou
Copy link
Contributor

This is to fix Clang module build in chromium.

This is to fix Clang module build in chromium.
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics labels May 12, 2025
@llvmbot
Copy link
Member

llvmbot commented May 12, 2025

@llvm/pr-subscribers-backend-x86

Author: Takuto Ikuta (atetubou)

Changes

This is to fix Clang module build in chromium.


Full diff: https://github.com/llvm/llvm-project/pull/139496.diff

1 Files Affected:

  • (modified) clang/lib/Headers/mm_malloc.h (+2)
diff --git a/clang/lib/Headers/mm_malloc.h b/clang/lib/Headers/mm_malloc.h
index d32fe59416277..dec91fc3f720a 100644
--- a/clang/lib/Headers/mm_malloc.h
+++ b/clang/lib/Headers/mm_malloc.h
@@ -15,6 +15,8 @@
 #ifdef _WIN32
 #include <malloc.h>
 #else
+#include <stddef.h>
+
 #ifndef __cplusplus
 extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
 #else

@llvmbot
Copy link
Member

llvmbot commented May 12, 2025

@llvm/pr-subscribers-clang

Author: Takuto Ikuta (atetubou)

Changes

This is to fix Clang module build in chromium.


Full diff: https://github.com/llvm/llvm-project/pull/139496.diff

1 Files Affected:

  • (modified) clang/lib/Headers/mm_malloc.h (+2)
diff --git a/clang/lib/Headers/mm_malloc.h b/clang/lib/Headers/mm_malloc.h
index d32fe59416277..dec91fc3f720a 100644
--- a/clang/lib/Headers/mm_malloc.h
+++ b/clang/lib/Headers/mm_malloc.h
@@ -15,6 +15,8 @@
 #ifdef _WIN32
 #include <malloc.h>
 #else
+#include <stddef.h>
+
 #ifndef __cplusplus
 extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
 #else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants