]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ar: Avoid overwriting the stdout file stream pointer
authorMark Johnston <markj@FreeBSD.org>
Thu, 27 Jan 2022 22:10:17 +0000 (17:10 -0500)
committerEd Maste <emaste@FreeBSD.org>
Wed, 9 Feb 2022 15:25:28 +0000 (10:25 -0500)
commit4cd49eda1f6e5b8094279394e41560e515c5ca55
treec5239373bb2d7ab0ff08cd78d46cd4d3a6b62e89
parentd8ffb451194ec2d91a549e0682370f312d0ecdd3
ar: Avoid overwriting the stdout file stream pointer

This doesn't work with musl, which defines stdout as FILE * const.
Instead, explicitly pass the desired output stream to ar_read_archive().

No functional change intended.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34064

(cherry picked from commit 41e6398f9bc1bba4ed872118e742096d692fdfec)
usr.bin/ar/acpyacc.y
usr.bin/ar/ar.c
usr.bin/ar/ar.h
usr.bin/ar/read.c