- Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
default post handler). (Ilia)
+- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
+ (fmajid at kefta dot com, Dmitry)
- Fixed gd build when used with freetype 1.x (Pierre, Tony)
- Fixed bug #41287 (Namespace functions don't allow xmlns definition to be
optional). (Rob)
int listen_socket;
sa_t sa;
socklen_t sock_len;
+#ifdef SO_REUSEADDR
+# ifdef _WIN32
+ BOOL reuse = 1;
+# else
+ int reuse = 1;
+# endif
+#endif
if ((s = strchr(path, ':'))) {
port = atoi(s+1);
/* Create, bind socket and start listen on it */
if ((listen_socket = socket(sa.sa.sa_family, SOCK_STREAM, 0)) < 0 ||
+#ifdef SO_REUSEADDR
+ setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, sizeof(reuse)) < 0 ||
+#endif
bind(listen_socket, (struct sockaddr *) &sa, sock_len) < 0 ||
listen(listen_socket, backlog) < 0) {