]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Add <limits.h> header
authorMinsoo Choo <minsoochoo0122@proton.me>
Mon, 28 Nov 2022 21:24:17 +0000 (16:24 -0500)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2022 21:24:17 +0000 (13:24 -0800)
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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Closes #14225

lib/libtpool/thread_pool.c
lib/libzpool/kernel.c

index 3eef3d1e481916ee5d790afce05f03966812931f..7802f8c1750f6df65df725e61752c2080da83c5a 100644 (file)
@@ -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;
index 77264470baef057c845e9a5dcff797d23075a04f..0e3e4cee7baaf0a7d7f55d72ed437c291c332d57 100644 (file)
@@ -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>