From: Duncan Overbruck Date: Mon, 24 Jan 2022 15:47:00 +0000 (+0100) Subject: test: Remove static FILE declaration from fpurge test X-Git-Tag: 0.11.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=091097e0626e5cd3ba5f83da47438c88977e88bc;p=thirdparty%2Flibbsd.git test: Remove static FILE declaration from fpurge test This does not work with libcs that do not declare the structure in a header file, like musl. And gets in the way of supporting non-fd based streams. Signed-off-by: Guillem Jover --- diff --git a/test/fpurge.c b/test/fpurge.c index a99cff7..1118f23 100644 --- a/test/fpurge.c +++ b/test/fpurge.c @@ -29,15 +29,11 @@ int main(int argc, char *argv[]) { - static FILE fp_bad; FILE *fp; if (fpurge(NULL) == 0) return 1; - if (fpurge(&fp_bad) == 0) - return 1; - fp = fopen("/dev/zero", "r"); if (fpurge(fp) < 0) return 1;