Ruslan Osmanov avatar Ruslan Osmanov committed 1e354b7

Fix: build on solaris

Comments (0)

Files changed (3)

classes/buffer_event.c

 				sizeof(PHP_EVENT_SUN_PREFIX) - 1) == 0) {
 		/* UNIX domain socket path */
 
-		struct sockaddr_un *sun;
+		struct sockaddr_un *s_un;
 
-		sun             = (struct sockaddr_un *) &ss;
-		sun->sun_family = AF_UNIX;
+		s_un             = (struct sockaddr_un *) &ss;
+		s_un->sun_family = AF_UNIX;
 		ss_len          = sizeof(struct sockaddr_un);
 
-		strcpy(sun->sun_path, addr + sizeof(PHP_EVENT_SUN_PREFIX) - 1);
+		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. */

classes/listener.c

 
 		if (strncasecmp(Z_STRVAL_PP(ppztarget), PHP_EVENT_SUN_PREFIX,
 					sizeof(PHP_EVENT_SUN_PREFIX) - 1) == 0) {
-			struct sockaddr_un *sun;
+			struct sockaddr_un *s_un;
 
-			sun             = (struct sockaddr_un *) &ss;
-			sun->sun_family = AF_UNIX;
+			s_un             = (struct sockaddr_un *) &ss;
+			s_un->sun_family = AF_UNIX;
 
-			strcpy(sun->sun_path, Z_STRVAL_PP(ppztarget) + sizeof(PHP_EVENT_SUN_PREFIX) - 1);
+			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) {
 [  --enable-event-sockets Enable sockets support in Event], yes, no)
 
 if test "$PHP_EVENT_CORE" != "no"; then
+
+  OLD_LDFLAGS=$LDFLAGS
+  OLD_LIBS=$LIBS
+
   dnl {{{ Check for PHP version
 
   dnl The following fails sometimes. See bug #65319
   PHP_ADD_INCLUDE($ext_builddir/classes)
   PHP_ADD_INCLUDE($ext_builddir)
   PHP_SUBST(EVENT_SHARED_LIBADD)
-  PHP_SUBST(CFLAGS)
-  PHP_SUBST(LDLAGS)
-  PHP_SUBST(LIBS)
+
+  LDFLAGS=$OLD_LDFLAGS
+  LIBS=$OLD_LIBS
 
   dnl This works with static building only
   dnl test -z $PHP_SOCKETS && PHP_SOCKETS="no"
     AC_DEFINE(HAVE_SOCKETS, 1, [Whether sockets extension is enabled])
   fi
 
+
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
 
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.