Skip to content

Commit aa90986

Browse files
Michal RokosJunio C Hamano
authored andcommitted
archive: use setvbuf() instead of setlinebuf()
This tiny patch makes GIT compile again on HP-UX 11i. [jc: The setlinebuf() is described as unportable to BSD before 4.2; it's not even in POSIX, while setvbuf() is in ISO C.] Signed-off-by: Michal Rokos <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6994560 commit aa90986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-archive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
249249
if (remote)
250250
return run_remote_archiver(remote, argc, argv);
251251

252-
setlinebuf(stderr);
252+
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
253253

254254
memset(&ar, 0, sizeof(ar));
255255
tree_idx = parse_archive_args(argc, argv, &ar);

0 commit comments

Comments
 (0)