Hi,
Steffen Prohaska wrote:
> --- a/wrapper.c
> +++ b/wrapper.c
> @@ -139,6 +139,14 @@ ssize_t xread(int fd, void *buf, size_t len)
> {
> ssize_t nr;
> while (1) {
> +#ifdef __APPLE__
> + const size_t twoGB = (1l << 31);
> + /* len >= 2GB immediately fails on Mac OS X with EINVAL when
> + * reading from pipe. */
> + if (len >= twoGB) {
> + len = twoGB - 1;
> + }
> +#endif
> nr = read(fd, buf, len);
See 6c642a87 (compat: large write(2) fails on Mac OS X/XNU,
2013-05-10) for a cleaner way to do this.
Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html