Skip to content

filterdiff: error: assignment of read-only variable 'stdout' (on musl) #91

@hhoffstaette

Description

@hhoffstaette

Looks like a last-minute change for support of --in-place changed something that does not compile on musl..again:

gcc -DHAVE_CONFIG_H -I.   -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I./src -I./lib -I./lib -pipe -O2 -Wall -MT src/filterdiff.o -MD -MP -MF $depbase.Tpo -c -o src/filterdiff.o src/filterdiff.c &&\
mv -f $depbase.Tpo $depbase.Po
src/filterdiff.c: In function 'main':
src/filterdiff.c:1833:40: error: assignment of read-only variable 'stdout'
 1833 |                                 stdout = temp_output;
      |                                        ^
src/filterdiff.c:1838:40: error: assignment of read-only variable 'stdout'
 1838 |                                 stdout = old_stdout;
      |                                        ^

Musl does not support stdin/stdout/stderr reassignment.
In case you're wondering about the reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions