diff --git a/protobuf.c b/protobuf.c index 061c6d3..f95122e 100644 --- a/protobuf.c +++ b/protobuf.c @@ -1,7 +1,7 @@ -#include -#include -#include #include +#include +#include +#include #include "simple_protobuf.h" static uint32_t read_num(FILE* fp) { diff --git a/simple_protobuf.h b/simple_protobuf.h index f730b4c..4c0adc1 100644 --- a/simple_protobuf.h +++ b/simple_protobuf.h @@ -1,6 +1,7 @@ #ifndef _SIMPLE_PROTOBUF_H_ #define _SIMPLE_PROTOBUF_H_ +#include #include struct SIMPLE_PB { diff --git a/test.c b/test.c index 13eeeb0..1d5c432 100644 --- a/test.c +++ b/test.c @@ -33,7 +33,7 @@ int main() { if(fp) { SIMPLE_PB* spb = get_pb(fp); memcpy(&t, spb->target, sizeof(struct TEST)); - printf("a:%u\nb:%u\nc:%u\nd:%llu\ne:%s\n", t.a, t.b, t.c, t.d, t.e); + printf("a:%u\nb:%u\nc:%u\nd:%lu\ne:%s\n", t.a, t.b, t.c, t.d, t.e); printf("Struct size: %u, read: %u\n", spb->struct_len, spb->real_len); } else perror("[SPB]"); } else perror("[SPB]");