[libc-commits] [libc] [libc] Add missing errno_macros.h include to pthread schedparam (PR #191235)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Thu Apr 9 09:12:35 PDT 2026
https://github.com/kaladron created https://github.com/llvm/llvm-project/pull/191235
Both pthread_attr_getschedparam and pthread_attr_setschedparam use ENOTSUP but relied on getting it transitively through <pthread.h>. Added the explicit include so these files compile in standalone builds with -nostdinc.
>From 8281b52cf7fc261e19c9426425087a5fc32d27c1 Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Thu, 9 Apr 2026 16:39:28 +0100
Subject: [PATCH] [libc] Add missing errno_macros.h include to pthread
schedparam
Both pthread_attr_getschedparam and pthread_attr_setschedparam
use ENOTSUP but relied on getting it transitively through
<pthread.h>. Added the explicit include so these files compile
in standalone builds with -nostdinc.
---
libc/src/pthread/pthread_attr_getschedparam.cpp | 1 +
libc/src/pthread/pthread_attr_setschedparam.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/libc/src/pthread/pthread_attr_getschedparam.cpp b/libc/src/pthread/pthread_attr_getschedparam.cpp
index 5219c4a75c862..51fddea672af0 100644
--- a/libc/src/pthread/pthread_attr_getschedparam.cpp
+++ b/libc/src/pthread/pthread_attr_getschedparam.cpp
@@ -11,6 +11,7 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
+#include "hdr/errno_macros.h"
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_attr_setschedparam.cpp b/libc/src/pthread/pthread_attr_setschedparam.cpp
index 1a80f0bd48d24..76b2e5177676c 100644
--- a/libc/src/pthread/pthread_attr_setschedparam.cpp
+++ b/libc/src/pthread/pthread_attr_setschedparam.cpp
@@ -11,6 +11,7 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
+#include "hdr/errno_macros.h"
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
More information about the libc-commits
mailing list