blob: f9f1750254ddf7fec577ef08edd7dccf197c4c68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/src/capture.c b/src/capture.c
index 911c35f..2bcfc56 100644
--- a/src/capture.c
+++ b/src/capture.c
@@ -190,13 +190,14 @@ capture_offline(const char *infile, const char *outfile)
}
// Reopen tty for ncurses after pcap have used stdin
+ #ifdef __GLIBC__
if (!strncmp(infile, "/dev/stdin", 10)) {
if (!(stdin = freopen("/dev/tty", "r", stdin))) {
fprintf(stderr, "Failed to reopen tty while using stdin for capture.");
return 1;
}
}
-
+ #endif
// Get datalink to parse packets correctly
capinfo->link = pcap_datalink(capinfo->handle);
|