Skip to content

FCGI compile error with fcgi-2.4.1 #22

Description

@rogersk

compile fails with fcgi-2.4.1-SNAP-0311112127 (http://www.fastcgi.com/dist/fcgi.tar.gz)

check_fcgi_ping.c: In function ‘main’:
check_fcgi_ping.c:83:5: error: too few arguments to function ‘OS_Close’
/usr/local/include/fcgios.h:116:12: note: declared here

yes, fcgios.h has a different declaration

116 DLLAPI int OS_Close(int fd, int shutdown);

tried to "fix":

 diff --git a/fcgi/check_fcgi_ping.c b/fcgi/check_fcgi_ping.c
index 048aac3..8cb6d73 100644
--- a/fcgi/check_fcgi_ping.c
+++ b/fcgi/check_fcgi_ping.c
@@ -80,7 +80,7 @@ int main (int argc, char **argv) {
     } while (type != FCGI_GET_VALUES_RESULT);

     /* Close connection */
-    OS_Close(fcgiSock);
+    OS_Close(fcgiSock,1);

     time_delta = mp_time_delta(start_time);
     mp_perfdata_float("time", (float)time_delta, "s", NULL);

POC

./check_fcgi_ping -s /home/fastcgi/php54.fcgi --perfdata
OK - FCGI-Pong: /home/fastcgi/php54.fcgi| time=0.025s;

seems to work with either arg 0 or 1.
btw, in both cases I get a segfault when run without arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions