Re: PHP5.5 flock compatibility
On Mon, 2013-03-25 at 09:28 +0100, Ondřej Surý wrote:
> Hi Debian Hurd porters,
>
>
> could somebody look at the build log:
> https://buildd.debian.org/status/fetch.php?pkg=php5&arch=hurd-i386&ver=5.5.0~beta1-1&stamp=1363956014
>
>
>
> and provide usable patch? :)
>
>
> I will then push it into upstream, because Hurd built just fine before
> the Zend OpCache was introduced.
Inlined below is a small patch to enable php5.5.0~beta1 to build on
GNU/Hurd. In addition to the flock definition (I think the place is
right) there was a MAXPATHLEN issue too. Not yet run tested though.
--- a/ext/opcache/ZendAccelerator.h 2013-03-20 15:09:27.000000000
+0100
+++ b/ext/opcache/ZendAccelerator.h 2013-03-25 21:30:26.000000000
+0100
@@ -80,6 +80,9 @@
# endif
# include <direct.h>
#else
+# ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+# endif
# include <sys/param.h>
#endif
@@ -99,7 +102,7 @@ extern int lock_file;
# elif defined(__svr4__)
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
struct flock name = {type, whence, start, len}
-# elif defined(__linux__) || defined(__hpux)
+# elif defined(__linux__) || defined(__hpux) || defined(__GNU__)
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
struct flock name = {type, whence, start, len, 0}
# elif defined(_AIX)
Reply to: