summaryrefslogtreecommitdiff
path: root/net-analyzer/tcptrace/files/tcptrace-6.6.7-fix-build-clang16.patch
blob: fa1fd322c83e42135ee92fe93bd0a33cb68c2bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Bug: https://bugs.gentoo.org/897830
--- a/compress.c
+++ b/compress.c
@@ -61,6 +61,8 @@ static char const GCC_UNUSED rcsid[] =
 
 #include "compress.h"
 #include <sys/wait.h>
+#include <stdio.h>
+#include <stdio_ext.h>
 
 /*
  * OK, this stuff is a little complicated.  Here's why:
@@ -240,7 +242,7 @@ CompReopenFile(
     /* erase the file buffer and reposition to the front */
 #ifdef HAVE_FPURGE
     /* needed for NetBSD and FreeBSD (at least) */
-    fpurge(stdin);		/* discard input buffer */
+    __fpurge(stdin);		/* discard input buffer */
 #else /* HAVE_FPURGE */
     fflush(stdin);		/* discard input buffer */
 #endif /* HAVE_FPURGE */
@@ -599,7 +601,7 @@ PipeHelper(void)
     // read end of the pipe, fdpipe[0]
     
 #ifdef HAVE_FPURGE     
-     fpurge(stdin); // needed for NetBSD/FreeBSD
+     __fpurge(stdin); // needed for NetBSD/FreeBSD
 #else
      fflush(stdin);
 #endif