pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/php* broken on NetBSD, patch supplied



A recent commit to the main NetBSD tree, 
http://cvsweb.netbsd.org/bsdweb.cgi/src/include/stdio.h.diff?r1=1.79&r2=1.80&f=h&only_with_tag=MAIN&f=u
changed fpos_t, which causes main/streams/cast.c to fail to compile
on NetBSD in both the lang/php5 and lang/php53 ports.  It also breaks
some other packages, including print/cups, so it may be better to
fix this in the main tree rather than in pkgsrc, but the following
patch fixes both lang/php5 and lang/php53, and hopefully doesn't
break anything else:

--- main/streams/cast.c.orig    2012-01-28 19:04:58.000000000 +0000
+++ main/streams/cast.c 2012-01-28 19:05:05.000000000 +0000
@@ -34,7 +34,7 @@
 typedef struct {
        int (*reader)(void *, char *, int);
        int (*writer)(void *, const char *, int);
-       fpos_t (*seeker)(void *, fpos_t, int);
+       off_t (*seeker)(void *, off_t, int);
        int (*closer)(void *);
 } COOKIE_IO_FUNCTIONS_T;
 
@@ -68,11 +68,11 @@
        return php_stream_write((php_stream *)cookie, (char *)buffer, size);
 }
 
-static fpos_t stream_cookie_seeker(void *cookie, off_t position, int whence)
+static off_t stream_cookie_seeker(void *cookie, off_t position, int whence)
 {
        TSRMLS_FETCH();
 
-       return (fpos_t)php_stream_seek((php_stream *)cookie, position, whence);
+       return (off_t)php_stream_seek((php_stream *)cookie, position, whence);
 }
 
 static int stream_cookie_closer(void *cookie)
-- 
John Stalker
School of Mathematics
Trinity College Dublin
tel +353 1 896 1983
fax +353 1 896 2282


Home | Main Index | Thread Index | Old Index