X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__toread.c;h=2e804f641dbd8a2363f88c4c08696e1f89627d08;hb=490d4a0e9e96eabffa553b279b07725c39010c1a;hp=f00cc467ee9c4c371a874cb3943f23557976d0d0;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c index f00cc467..2e804f64 100644 --- a/src/stdio/__toread.c +++ b/src/stdio/__toread.c @@ -12,3 +12,13 @@ int __toread(FILE *f) f->rpos = f->rend = f->buf; return 0; } + +static const int dummy = 0; +weak_alias(dummy, __towrite_used); + +void __stdio_exit(void); + +void __seek_on_exit() +{ + if (!__towrite_used) __stdio_exit(); +}