From 5e756bec1e55cfa2b7dbcfc99f9f0b0baf719ab0 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Wed, 30 Oct 2013 17:23:44 +1030 Subject: [PATCH] Fix types for 64-bit compilation --- http_server.c | 4 ++-- rhizome.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/http_server.c b/http_server.c index 87645cd8..b3bd6c99 100644 --- a/http_server.c +++ b/http_server.c @@ -75,7 +75,7 @@ static struct profile_total http_server_stats = { #define DEBUG_DUMP_PARSER(r) do { \ if (config.debug.httpd) \ - DEBUGF("parsed %d %s cursor %d %s end %d remain %"PRIhttp_size_t, \ + DEBUGF("parsed %"PRIhttp_size_t" %s cursor %"PRIhttp_size_t" %s end %"PRIhttp_size_t" remain %"PRIhttp_size_t, \ r->parsed - r->received, alloca_toprint(-1, r->parsed, r->cursor - r->parsed), \ r->cursor - r->received, alloca_toprint(50, r->cursor, r->end - r->cursor), \ r->end - r->received, \ @@ -812,7 +812,7 @@ static int http_request_parse_header(struct http_request *r) _commit(r); if (n > NELS(r->request_header.content_ranges)) { if (r->debug_flag && *r->debug_flag) - DEBUGF("HTTP request Range header overflow (%u ranges in set, can only handle %u): %s", + DEBUGF("HTTP request Range header overflow (%u ranges in set, can only handle %zu): %s", n, NELS(r->request_header.content_ranges), alloca_toprint(-1, sol, eol - sol)); // In this case ignore the Range: header -- respond with the entire resource. r->request_header.content_range_count = 0; diff --git a/rhizome.h b/rhizome.h index e856ff54..61532656 100644 --- a/rhizome.h +++ b/rhizome.h @@ -740,7 +740,7 @@ int rhizome_journal_pipe(struct rhizome_write *write, const rhizome_filehash_t * int rhizome_crypt_xor_block(unsigned char *buffer, size_t buffer_size, int64_t stream_offset, const unsigned char *key, const unsigned char *nonce); int rhizome_open_read(struct rhizome_read *read, const rhizome_filehash_t *hashp); -int rhizome_read(struct rhizome_read *read, unsigned char *buffer, size_t buffer_length); +ssize_t rhizome_read(struct rhizome_read *read, unsigned char *buffer, size_t buffer_length); int rhizome_read_buffered(struct rhizome_read *read, struct rhizome_read_buffer *buffer, unsigned char *data, size_t len); int rhizome_read_close(struct rhizome_read *read); int rhizome_open_decrypt_read(rhizome_manifest *m, rhizome_bk_t *bsk, struct rhizome_read *read_state);