]> git.lizzy.rs Git - dragonnet.git/blobdiff - typegen/main.c
Fix compilation error introduced by last commit
[dragonnet.git] / typegen / main.c
index 6c397defaa02a27609b3ffe54ca1344bdcae61ae..236d2bc041c4ef94b1ee8ba72b6b654ab028a918 100644 (file)
@@ -548,11 +548,14 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv)
        fprintf(c_fp, "\tThis file was automatically generated by Dragonnet.\n");
        fprintf(c_fp, "\tDo NOT edit it manually. Instead, edit types.dnet and re-run DragonnetTypegen.\n");
        fprintf(c_fp, "*/\n\n");
-       fprintf(c_fp, "#include <stdlib.h>\n");
-       fprintf(c_fp, "#include <string.h>\n");
        fprintf(c_fp, "#include <dragonnet/recv.h>\n");
        fprintf(c_fp, "#include <dragonnet/send.h>\n");
+       fprintf(c_fp, "#include <endian.h/endian.h>\n");
+       fprintf(c_fp, "#include <stdlib.h>\n");
+       fprintf(c_fp, "#include <string.h>\n");
        fprintf(c_fp, "#include <zlib.h>\n\n");
+       fprintf(c_fp, "#define htobe8(x) (x)\n");
+       fprintf(c_fp, "#define be8toh(x) (x)\n\n");
        fprintf(c_fp, "#include \"dnet-types.h\"\n\n");
 
        FILE *h_fp = fopen("dnet-types.h", "w");
@@ -560,9 +563,9 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv)
        fprintf(h_fp, "\tThis file was automatically generated by Dragonnet.\n");
        fprintf(h_fp, "\tDo NOT edit it manually. Instead, edit types.dnet and re-run DragonnetTypegen.\n");
        fprintf(h_fp, "*/\n\n");
-       fprintf(h_fp, "#include <dragontype/number.h>\n\n");
-       fprintf(h_fp, "#define htobe8(x) (x)\n");
-       fprintf(h_fp, "#define be8toh(x) (x)\n\n");
+       fprintf(h_fp, "#include <dragonnet/peer.h>\n");
+       fprintf(h_fp, "#include <dragontype/number.h>\n");
+       fprintf(h_fp, "#include <stddef.h>\n");
        fprintf(h_fp, "typedef char *string;\n\n");
        fprintf(h_fp, "typedef struct {\n\tu32 siz;\n\tu8 *data;\n} *Blob;\n\n");
        fprintf(h_fp, "typedef struct {\n");