]> git.lizzy.rs Git - protogen.git/blobdiff - protogen.lua
Update endian include
[protogen.git] / protogen.lua
index 3e611ddcb830dd0e6cace0d1570c29602ce9f78d..1139a9da846149e80e71041d53f01554a3afea29 100755 (executable)
@@ -49,7 +49,7 @@ emit_h([[
 typedef char *String;
 
 typedef struct {
-       size_t siz;
+       uint64_t siz;
        unsigned char *data;
 } ]] .. struct_prefix .. [[Blob;
 
@@ -63,7 +63,8 @@ emit_c([[
 #include <dragonnet/recv.h>
 #endif
 
-#include <endian.h/endian.h>
+#include <endian.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -88,7 +89,7 @@ emit_c([[
                return true;
 
        if (buffer->siz < len) {
-               fprintf(stderr, "[warning] buffer exhausted (requested bytes: %lu, remaining bytes: %lu)\n", len, buffer->siz);
+               fprintf(stderr, "[warning] buffer exhausted (requested bytes: %zu, remaining bytes: %" PRIu64 ")\n", len, buffer->siz);
                return false;
        }