Commits

Ruslan Osmanov committed f7660c2

Fix: build error zts
Fix: redundant func caused build errors
Fix: build erros on Fedora 18

Comments (0)

Files changed (4)

classes/ssl_context.c

 
 				if (zend_hash_index_find(ht, PHP_EVENT_OPT_LOCAL_PK,
 						(void **) &ppz_private_key) == SUCCESS) {
-					_php_event_ssl_ctx_set_local_cert(ctx, Z_STRVAL_PP(ppzval), Z_STRVAL_PP(ppz_private_key));
+					_php_event_ssl_ctx_set_local_cert(ctx, Z_STRVAL_PP(ppzval), Z_STRVAL_PP(ppz_private_key) TSRMLS_CC);
 				} else {
-					_php_event_ssl_ctx_set_local_cert(ctx, Z_STRVAL_PP(ppzval), NULL);
+					_php_event_ssl_ctx_set_local_cert(ctx, Z_STRVAL_PP(ppzval), NULL TSRMLS_CC);
 				}
 				break;
 			case PHP_EVENT_OPT_LOCAL_PK:
 			case PHP_EVENT_OPT_CIPHERS:
 				got_ciphers = 1;
 				convert_to_string_ex(ppzval);
-				set_ciphers(ctx, Z_STRVAL_PP(ppzval));
+				set_ciphers(ctx, Z_STRVAL_PP(ppzval) TSRMLS_CC);
 				break;
 			default:
 				php_error_docref(NULL TSRMLS_CC, E_WARNING,
 	}
 
 	if (got_ciphers == 0) {
-		set_ciphers(ctx, "DEFAULT");
+		set_ciphers(ctx, "DEFAULT" TSRMLS_CC);
 	}
 
 	if (cafile || capath) {
-		set_ca(ctx, cafile, capath);
+		set_ca(ctx, cafile, capath TSRMLS_CC);
 	}
 }
 /* }}} */
   fi
   dnl }}}
 
+  if test -d $EVENT_DIR/lib64; then
+    PHP_EVENT_EXTA_LIB=$EVENT_DIR/lib64
+  else
+    PHP_EVENT_EXTA_LIB=
+  fi
+
   AC_MSG_CHECKING([for directory storing libevent binaries])
   if test -r $EVENT_DIR/$PHP_LIBDIR/libevent_core.$SHLIB_SUFFIX_NAME; then 
     EVENT_LIB_DIR=$EVENT_DIR/$PHP_LIBDIR
     AC_MSG_RESULT(found in $EVENT_LIB_DIR)
   else # Usually FreeBSD and other non-standard setups
-    for i in /usr/$PHP_LIBDIR /usr/local/$PHP_LIBDIR /usr/local/$PHP_LIBDIR/event2 /opt/$PHP_LIBDIR; do
+    for i in $PHP_EVENT_EXTA_LIB /usr/$PHP_LIBDIR /usr/local/$PHP_LIBDIR /usr/local/$PHP_LIBDIR/event2 /opt/$PHP_LIBDIR; do
       if test -r $i/libevent_core.$SHLIB_SUFFIX_NAME; then
         EVENT_LIB_DIR=$i
         AC_MSG_RESULT(found in $i)
   ],[
     AC_MSG_ERROR([libevent_core >= 2.0.2-alpha not found])
   ],[
-    -L$EVENT_LIB_DIR
+    -L$EVENT_LIB_DIR -L$PHP_EVENT_EXTA_LIB
   ])
   dnl }}}
   
     ],[
       AC_MSG_ERROR([libevent_extra >= 2.0 not found])
     ],[
-      -L$EVENT_LIB_DIR -levent_core
+      -L$EVENT_LIB_DIR -L$PHP_EVENT_EXTA_LIB -levent_core
     ])
 
     event_src="$event_src \
     ], [
         AC_MSG_ERROR([libevent_openssl >= 2.0 not found])
     ], [
-      -L$EVENT_LIB_DIR -levent_core
+      -L$EVENT_LIB_DIR -L$PHP_EVENT_EXTA_LIB -levent_core
     ])
 
     event_src="$event_src classes/ssl_context.c"
 }
 /* }}} */
 
-/* {{{ php_event_ssl_dummy_stream
- * Creates a dummy ssl stream which may be used to detect whether a stream is an ssl stream */
-php_stream *php_event_ssl_dummy_stream(void)
-{
-	char *errstr = NULL;
-	int errcode  = 0;
-
-	php_stream *ssl_stream = php_stream_xport_create("ssl://127.0.0.1:445",
-			sizeof("ssl://127.0.0.1:445") - 1, 0,
-			STREAM_XPORT_CLIENT, NULL, NULL, NULL, &errstr, &errcode);
-
-	return ssl_stream;
-}
-/* }}} */
 
 /*
  * Local variables:
 #define PHP_EVENT_UTIL_H
 
 php_socket_t php_event_zval_to_fd(zval **ppfd TSRMLS_DC);
-php_stream *php_event_ssl_dummy_stream(void);
 
 #define php_event_is_pending(e) \
 	event_pending((e), EV_READ | EV_WRITE | EV_SIGNAL | EV_TIMEOUT, NULL)
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.