Navigation Menu

Skip to content

Commit

Permalink
Fix lseek related type
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 16, 2015
1 parent 74dcae6 commit 2f0a021
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/grn.h
Expand Up @@ -458,14 +458,14 @@ typedef int grn_cond;
# else /* WIN64 */
# define GRN_FMT_SOCKET "u"
# endif /* WIN64 */
# define GRN_FMT_OFF_T GRN_FMT_LLD
# define GRN_FMT_OFF64_T GRN_FMT_LLD
#else /* WIN32 */
# define GRN_FMT_LLD "lld"
# define GRN_FMT_LLU "llu"
# define GRN_FMT_SIZE "zu"
# define GRN_FMT_SSIZE "zd"
# define GRN_FMT_SOCKET "d"
# define GRN_FMT_OFF_T "jd"
# define GRN_FMT_OFF64_T "jd"
#endif /* WIN32 */

#ifdef __GNUC__
Expand Down
5 changes: 3 additions & 2 deletions lib/ii.c
Expand Up @@ -7406,12 +7406,13 @@ grn_ii_buffer_fetch(grn_ctx *ctx, grn_ii_buffer *ii_buffer,
}
}
{
off_t seeked_position;
off64_t seeked_position;
seeked_position = grn_lseek(ii_buffer->tmpfd, block->head, SEEK_SET);
if (seeked_position != block->head) {
ERRNO_ERR("grn_lseek");
GRN_LOG(ctx, GRN_LOG_ERROR,
"failed to grn_lseek(%" GRN_FMT_OFF_T ") -> %" GRN_FMT_OFF_T,
"failed to "
"grn_lseek(%" GRN_FMT_OFF64_T ") -> %" GRN_FMT_OFF64_T,
block->head,
seeked_position);
return;
Expand Down

0 comments on commit 2f0a021

Please sign in to comment.