mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-04-22 18:20:13 +02:00
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 <guillem@hadrons.org>
This commit is contained in:
parent
5f9608c775
commit
091097e062
@ -29,15 +29,11 @@
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
static FILE fp_bad;
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
if (fpurge(NULL) == 0)
|
if (fpurge(NULL) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (fpurge(&fp_bad) == 0)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
fp = fopen("/dev/zero", "r");
|
fp = fopen("/dev/zero", "r");
|
||||||
if (fpurge(fp) < 0)
|
if (fpurge(fp) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user