From: David Turner Date: Wed, 13 Apr 2016 17:10:35 GMT Subject: Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff Message-ID: <1460567435.5540.74.camel@twopensource.com> In-Reply-To: <570E7B1B.6040207@ramsayjones.plus.com> On Wed, 2016-04-13 at 18:00 +0100, Ramsay Jones wrote: > > On 13/04/16 01:32, David Turner wrote: > > [snip] > > > diff --git a/git-compat-util.h b/git-compat-util.h > > index c07e0c1..8b878fe 100644 > > --- a/git-compat-util.h > > +++ b/git-compat-util.h > > @@ -513,6 +513,7 @@ static inline int ends_with(const char *str, > > const char *suffix) > > #define PROT_READ 1 > > #define PROT_WRITE 2 > > #define MAP_PRIVATE 1 > > +#define MAP_SHARED 2 > > #endif > > > > #define mmap git_mmap > > @@ -1045,4 +1046,21 @@ struct tm *git_gmtime_r(const time_t *, > > struct tm *); > > #define getc_unlocked(fh) getc(fh) > > #endif > > > > +#ifdef __linux__ > > +#define UNIX_PATH_MAX 108 > > +#elif defined(__APPLE__) || defined(BSD) > > +#define UNIX_PATH_MAX 104 > > +#else > > +/* > > + * Quoth POSIX: The size of sun_path has intentionally been left > > + * undefined. This is because different implementations use > > different > > + * sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD > > uses a > > + * size of 104. Since most implementations originate from BSD > > + * versions, the size is typically in the range 92 to 108. > > + * > > + * Thanks, POSIX! Super-helpful! Hope we don't overflow any > > buffers! > > + */ > > +#define UNIX_PATH_MAX 92 > > +#endif > > + > > It seems you forgot to delete this hunk. ;-) Oops. Thanks.