commit - 88c260f4a8605679ac53139d0e8f8d7617d68ea9
commit + bafaf650cf9ee98df6390dc7b731fcf9546fb714
blob - 86f80b3ecac7e61aabf96d11efa5bafe09c3114d
blob + b8905674bba37940821ad62fa951f062eb2f9093
--- lib/patch.c
+++ lib/patch.c
char buf[BUFSIZ];
size_t len, r, w;
- if (fseek(orig, copypos, SEEK_SET) == -1)
- return got_error_from_errno("fseek");
+ if (fseeko(orig, copypos, SEEK_SET) == -1)
+ return got_error_from_errno("fseeko");
while (pos == -1 || copypos < pos) {
len = sizeof(buf);
if (err == NULL) {
*pos = match;
*lineno = match_lineno;
- if (fseek(orig, match, SEEK_SET) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(orig, match, SEEK_SET) == -1)
+ err = got_error_from_errno("fseeko");
}
free(line);
* try to apply the hunk again starting the search
* after the previous partial match.
*/
- if (fseek(orig, pos, SEEK_SET) == -1) {
- err = got_error_from_errno("fseek");
+ if (fseeko(orig, pos, SEEK_SET) == -1) {
+ err = got_error_from_errno("fseeko");
goto done;
}
linelen = getline(&line, &linesize, orig);
blob - 4311a8209bec2cca71eb9926a09a36a884ee5eac
blob + 054a99b50f0835f1ab90b05dabba1586da811977
--- libexec/got-read-patch/got-read-patch.c
+++ libexec/got-read-patch/got-read-patch.c
break;
/* rewind to previous line */
- if (fseek(fp, linelen * -1, SEEK_CUR) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(fp, -linelen, SEEK_CUR) == -1)
+ err = got_error_from_errno("fseeko");
break;
}
}
if (err)
goto done;
if (*done) {
- if (fseek(fp, linelen * -1, SEEK_CUR) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(fp, -linelen, SEEK_CUR) == -1)
+ err = got_error_from_errno("fseeko");
goto done;
}