summaryrefslogtreecommitdiffstats
path: root/php-pecl-memcache-3.0.6-fdcast.patch
blob: 50d302171bd99af0dee0ab023d2425e51b32c276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Fix php_stream_cast() usage.

--- memcache-3.0.6/memcache_pool.c.fdcast	2011-04-11 05:56:53.000000000 +0100
+++ memcache-3.0.6/memcache_pool.c	2012-07-05 15:27:02.447511095 +0100
@@ -746,9 +746,9 @@ static int mmc_server_connect(mmc_pool_t
 	}
 
 	/* check connection and extract socket for select() purposes */
-	void *fd;
+	int fd;
 
-	if (!io->stream || php_stream_cast(io->stream, PHP_STREAM_AS_FD_FOR_SELECT, &fd, 1) != SUCCESS) {
+	if (!io->stream || php_stream_cast(io->stream, PHP_STREAM_AS_FD_FOR_SELECT, (void **)&fd, 1) != SUCCESS) {
 		mmc_server_seterror(mmc, errstr != NULL ? errstr : "Connection failed", errnum);
 		mmc_server_deactivate(pool, mmc TSRMLS_CC);