openwrt-packages/net/hcxdumptool/patches/020-stdout.patch

22 lines
645 B
Diff

From 63012853a81aa623f09304baf1f5b0b69f1ebfbd Mon Sep 17 00:00:00 2001
From: Tristian <2220506+Tristian@users.noreply.github.com>
Date: Tue, 16 Mar 2021 16:17:07 -0400
Subject: [PATCH] fix assignment of read-only variable 'stdout'
- stdout cannot be reassigned on some systems i.e OpenWRT on mipsel
---
hcxdumptool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/hcxdumptool.c
+++ b/hcxdumptool.c
@@ -7958,7 +7958,7 @@ while((auswahl = getopt_long(argc, argv,
else
{
fd_pcapng = fileno(stdout);
- stdout = fopen("/dev/null", "w");
+ freopen("/dev/null", "w", stdout);
}
}
pcapngoutname = optarg;