aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMinsoo Choo <[email protected]>2022-11-28 16:24:17 -0500
committerGitHub <[email protected]>2022-11-28 13:24:17 -0800
commitadf3b84fc7341864d13b99fcbecf18bbc325b1e4 (patch)
tree6f913261f592f0c5ae34184b7c5da24e423d2655 /lib
parent077fd55e85506ad892e9367b8ce7fb69e2ca590d (diff)
Add <limits.h> header
According to the UNIX standard, <pthread.h> does not include some PTHREAD_* values which are included in <limits.h>. OpenZFS uses some of these values in its code, and this might cause build failure on systems that do not have these PTHREAD_* values in <pthread.h> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Damian Szuberski <[email protected]> Signed-off-by: Minsoo Choo <[email protected]> Closes #14225
Diffstat (limited to 'lib')
-rw-r--r--lib/libtpool/thread_pool.c1
-rw-r--r--lib/libzpool/kernel.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libtpool/thread_pool.c b/lib/libtpool/thread_pool.c
index 3eef3d1e4..7802f8c17 100644
--- a/lib/libtpool/thread_pool.c
+++ b/lib/libtpool/thread_pool.c
@@ -28,6 +28,7 @@
#include <signal.h>
#include <errno.h>
#include <assert.h>
+#include <limits.h>
#include "thread_pool_impl.h"
static pthread_mutex_t thread_pool_lock = PTHREAD_MUTEX_INITIALIZER;
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index 77264470b..0e3e4cee7 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <libzutil.h>
#include <sys/crypto/icp.h>
#include <sys/processor.h>