From: Todd C. Miller Date: Tue, 7 Aug 2012 18:41:43 +0000 (-0400) Subject: Cast 2nd argument of lseek() to off_t if it is a constant for systems X-Git-Tag: SUDO_1_7_10~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=214728f2b4f65310cc6da02ea22bb0162fc6ac3c;p=sudo Cast 2nd argument of lseek() to off_t if it is a constant for systems with 64-bit off_t but without a proper lseek() prototype. --HG-- branch : 1.7 --- diff --git a/iolog.c b/iolog.c index 395e71061..f5845721a 100644 --- a/iolog.c +++ b/iolog.c @@ -146,7 +146,7 @@ io_nextid() sudo_user.sessid[6] = '\0'; /* Rewind and overwrite old seq file. */ - if (lseek(fd, 0, SEEK_SET) == (off_t)-1 || write(fd, buf, 7) != 7) + if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1 || write(fd, buf, 7) != 7) log_fatal(USE_ERRNO, "Can't write to %s", pathbuf); close(fd); }