Ruslan Osmanov avatar Ruslan Osmanov committed e209500 Merge

Merge branch 'master' of ssh://bitbucket.org/osmanov/pecl-event

Comments (0)

Files changed (4)

classes/buffer_event.c

 
 	memset(&ss, 0, sizeof(ss));
 
+#ifdef AF_UNIX
 	if (strncasecmp(addr, PHP_EVENT_SUN_PREFIX,
 				sizeof(PHP_EVENT_SUN_PREFIX) - 1) == 0) {
 		/* UNIX domain socket path */
 
 		strcpy(s_un->sun_path, addr + sizeof(PHP_EVENT_SUN_PREFIX) - 1);
 
-	} else if (evutil_parse_sockaddr_port(addr, (struct sockaddr *) &ss, &ss_len)) {
-		/* Numeric addresses only. Don't try to resolve hostname. */
+	} else
+#endif
+		if (evutil_parse_sockaddr_port(addr, (struct sockaddr *) &ss, &ss_len)) {
+			/* Numeric addresses only. Don't try to resolve hostname. */
 
-		php_error_docref(NULL TSRMLS_CC, E_WARNING,
-				"Failed parsing address: the address is not well-formed, "
-				"or the port is out of range");
-		RETURN_FALSE;
-	}
+			php_error_docref(NULL TSRMLS_CC, E_WARNING,
+					"Failed parsing address: the address is not well-formed, "
+					"or the port is out of range");
+			RETURN_FALSE;
+		}
 
 	/* bufferevent_socket_connect() allocates a socket stream internally, if we
 	 * didn't provide the file descriptor to the bufferevent before, e.g. with

classes/listener.c

 		socklen_t ss_len = sizeof(ss);
 		memset(&ss, 0, sizeof(ss));
 
+#ifdef AF_UNIX
 		if (strncasecmp(Z_STRVAL_PP(ppztarget), PHP_EVENT_SUN_PREFIX,
 					sizeof(PHP_EVENT_SUN_PREFIX) - 1) == 0) {
 			struct sockaddr_un *s_un;
 
 			strcpy(s_un->sun_path, Z_STRVAL_PP(ppztarget) + sizeof(PHP_EVENT_SUN_PREFIX) - 1);
 			ss_len = sizeof(struct sockaddr_un);
-		} else if (php_network_parse_network_address_with_port(Z_STRVAL_PP(ppztarget),
-					Z_STRLEN_PP(ppztarget), (struct sockaddr *) &ss, &ss_len TSRMLS_CC) != SUCCESS) {
-			ZVAL_NULL(zself);
-			return;
-		}
+		} else
+#endif
+			if (php_network_parse_network_address_with_port(Z_STRVAL_PP(ppztarget),
+						Z_STRLEN_PP(ppztarget), (struct sockaddr *) &ss, &ss_len TSRMLS_CC) != SUCCESS) {
+				ZVAL_NULL(zself);
+				return;
+			}
 
 		PHP_EVENT_FETCH_LISTENER(l, zself);
 
     <email>osmanov@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2013-09-13</date>
+  <date>2013-09-14</date>
   <!--{{{ Current version -->
   <version>
-    <release>1.7.7</release>
+    <release>1.7.8</release>
     <api>1.7.0</api>
   </version>
   <stability>
   </stability>
   <license uri="http://www.php.net/license">PHP</license>
   <notes><![CDATA[
-  Fix: incorrect handling of sockets extension dependency
-  (a hack for distros installing sockets separately)
+  Fix: build error on Solaris(when sockaddr_un was not available)
   ]]></notes>
   <!--}}}-->
   <!--{{{ Contents -->
   </extsrcrelease>
   <!--{{{ changelog-->
   <changelog>
+    <!--{{{ 1.7.8 -->
+    <release>
+      <version>
+        <release>1.7.8</release>
+        <api>1.7.0</api>
+      </version>
+      <stability>
+        <release>stable</release>
+        <api>stable</api>
+      </stability>
+      <license uri="http://www.php.net/license">PHP</license>
+      <notes><![CDATA[
+  Fix: build error on Solaris(when sockaddr_un was not available)
+  ]]></notes>
+    </release>
+    <!--}}}-->
     <!--{{{ 1.7.7 -->
     <release>
       <version>
 #ifndef PHP_EVENT_H
 #define PHP_EVENT_H
 
-#define PHP_EVENT_VERSION "1.7.7"
+#define PHP_EVENT_VERSION "1.7.8"
 
 #define PHP_EVENT_SUN_PREFIX "unix:"
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.