Skip to content

Commit efbf573

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: - BFN - Fixed bug #63983 (enabling FPM borks compile on FreeBSD) patch by: chibisuke at web dot de
2 parents aa31d7e + 891bd46 commit efbf573

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sapi/fpm/fpm/fpm_sockets.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,19 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
405405
zlog(ZLOG_SYSERROR, "failed to retrieve TCP_INFO for socket");
406406
return -1;
407407
}
408+
#if defined(__FreeBSD__)
409+
if (info.__tcpi_sacked == 0) {
410+
return -1;
411+
}
412+
413+
if (cur_lq) {
414+
*cur_lq = info.__tcpi_unacked;
415+
}
408416

417+
if (max_lq) {
418+
*max_lq = info.__tcpi_sacked;
419+
}
420+
#else
409421
/* kernel >= 2.6.24 return non-zero here, that means operation is supported */
410422
if (info.tcpi_sacked == 0) {
411423
return -1;
@@ -418,6 +430,7 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
418430
if (max_lq) {
419431
*max_lq = info.tcpi_sacked;
420432
}
433+
#endif
421434

422435
return 0;
423436
}

0 commit comments

Comments
 (0)