diff -Nru orig/RcppEigen/inst/include/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h patched/RcppEigen/inst/include/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h
--- orig/RcppEigen/inst/include/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h	2021-08-18 22:41:58.000000000 +0200
+++ patched/RcppEigen/inst/include/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h	2024-02-12 13:34:15.221189900 +0100
@@ -12,6 +12,7 @@
 
 // Try to come up with a portable way to yield
 #if EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)
+#include <sched.h>
 #define EIGEN_THREAD_YIELD() sched_yield()
 #else
 #define EIGEN_THREAD_YIELD() std::this_thread::yield()
