libdb/libdb-limit-cpu.patch
Petr Šabata 938bc523d7 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/libdb#bd2dd025b309694daf235e93e2afc57979aed52b
2020-10-15 15:46:23 +02:00

13 lines
381 B
Diff

diff -Naurp db_old/src/os/os_cpu.c db_new/src/os/os_cpu.c
--- db_old/src/os/os_cpu.c 2012-05-11 12:57:54.000000000 -0500
+++ db_new/src/os/os_cpu.c 2015-08-12 14:00:37.232498880 -0500
@@ -40,6 +40,8 @@ __os_cpu_count()
long nproc;
nproc = sysconf(_SC_NPROCESSORS_ONLN);
+ if (nproc > 1024)
+ nproc = 1024;
return ((u_int32_t)(nproc > 1 ? nproc : 1));
#else
return (1);