]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fast: Use correct printf specifier to print content length
authorTobias Brunner <tobias@strongswan.org>
Tue, 7 May 2019 12:48:19 +0000 (14:48 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2019 12:48:54 +0000 (14:48 +0200)
src/libfast/fast_request.c

index 0543215cbd8714a153894ec9f64b7644e626c4f0..5f6e392810cf90ce839d8b34f56fb08740938409 100644 (file)
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include <ClearSilver/ClearSilver.h>
 
@@ -303,7 +304,7 @@ METHOD(fast_request_t, sendfile, bool,
                return FALSE;
        }
        /* FCGX does not like large integers, print to a buffer using libc */
-       snprintf(buf, sizeof(buf), "%lld", (int64_t)data->len);
+       snprintf(buf, sizeof(buf), "%"PRId64, (int64_t)data->len);
        FCGX_FPrintF(this->req.out, "Content-Length: %s\n", buf);
        if (mime)
        {