]> wimlib.net Git - wimlib/blobdiff - include/wimlib/apply.h
Reduce MAX_OPEN_FILES to 128 on macOS where the default limit is 256
[wimlib] / include / wimlib / apply.h
index 2592fae6fd90da5bcd040de7b46313bcf7aa3d39..7813aee13d7df14fa101770abfeecc7b95c62c25 100644 (file)
@@ -81,7 +81,12 @@ struct apply_ctx {
 /* Maximum number of UNIX file descriptors, NTFS attributes, or Windows file
  * handles that can be opened simultaneously to extract a blob to multiple
  * destinations.  */
+#ifndef __APPLE__
 #define MAX_OPEN_FILES 512
+#else /* !__APPLE__ */
+/* With macOS, reduce to 128 because the default value for ulimit -n is 256 */
+#define MAX_OPEN_FILES 128
+#endif /* __APPLE__ */
 
 static inline int
 extract_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg)