Files
loongoffice/external/python3/macos-11.patch.0
Taichi Haradaguchi ea5843b67f Python3: update to 3.8.15
* Fixes CVE-2022-40674
* Removed 0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 as fixed upstream

Change-Id: I8e71f9a6b013ca4c45bf8774b284be98eee71bab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141691
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-24 21:01:48 +02:00

35 lines
1.2 KiB
Plaintext

--- setup.py
+++ setup.py
@@ -655,7 +655,10 @@
add_dir_to_list(self.compiler.include_dirs,
sysconfig.get_config_var("INCLUDEDIR"))
- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+ if MACOS:
+ system_lib_dirs = ['/usr/lib', macosx_sdk_root()+'/usr/lib']
+ else:
+ system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
system_include_dirs = ['/usr/include']
# lib_dirs and inc_dirs are used to search for files;
# if a file is found in one of those directories, it can
--- Modules/_posixsubprocess.c
+++ Modules/_posixsubprocess.c
@@ -30,6 +30,8 @@
# define SYS_getdents64 __NR_getdents64
#endif
+#include <limits.h>
+
#if defined(__sun) && defined(__SVR4)
/* readdir64 is used to work around Solaris 9 bug 6395699. */
# define readdir readdir64
@@ -201,7 +203,7 @@
#endif
#ifdef _SC_OPEN_MAX
local_max_fd = sysconf(_SC_OPEN_MAX);
- if (local_max_fd == -1)
+ if (local_max_fd == -1 || local_max_fd == LONG_MAX)
#endif
local_max_fd = 256; /* Matches legacy Lib/subprocess.py behavior. */
return local_max_fd;