Skip to content
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

[libc][errno] Include <linux/errno.h> for Linux in full build mode. #92041

Merged
merged 1 commit into from
May 13, 2024

Conversation

lntue
Copy link
Contributor

@lntue lntue commented May 13, 2024

No description provided.

@llvmbot
Copy link
Collaborator

llvmbot commented May 13, 2024

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

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

1 Files Affected:

  • (modified) libc/hdr/errno_macros.h (+2)
diff --git a/libc/hdr/errno_macros.h b/libc/hdr/errno_macros.h
index b5ef7dc2a2076..198b5233d4409 100644
--- a/libc/hdr/errno_macros.h
+++ b/libc/hdr/errno_macros.h
@@ -12,6 +12,8 @@
 #ifdef LIBC_FULL_BUILD
 
 #ifdef __linux__
+#include <linux/errno.h>
+
 #include "llvm-libc-macros/error-number-macros.h"
 #else // __linux__
 #include "llvm-libc-macros/generic-error-number-macros.h"

@lntue lntue merged commit 8960078 into llvm:main May 13, 2024
4 of 6 checks passed
@robincaloudis
Copy link
Contributor

Thank you for backing me up so quickly!

lntue pushed a commit that referenced this pull request May 15, 2024
Introduced in #91150. Not
needed anymore as #92041 fixed
the root cause. `ENAMETOOLONG` and `EOVERFLOW` are well defined in
`<linux/errno.h>`.

Post mortem: Due to the previously missing inclusion of
`<linux/errno.h>` (fixed with
#92041), I misinterpreted an
undefined macro issue during the development of
#91150 as being caused by a
missing definition rather than by the missing inclusion of the linux
header. I realized too late that `ENAMETOOLONG` and `EOVERFLOW` were
correctly defined in `<linux/errno.h>` and that it was my missing
inclusion that caused the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants