summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/tcpdump/util-print.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-11 09:33:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-11 09:37:36 +0100
commit24631e2263e341a5228d8444d6e557d8305c0c9e (patch)
tree04bb81dccd8a8f2847f91f2b17b026ed34325e20 /freebsd/contrib/tcpdump/util-print.c
parenttcpdump: Remove superfluous static variable (diff)
downloadrtems-libbsd-24631e2263e341a5228d8444d6e557d8305c0c9e.tar.bz2
tcpdump: Move static variables to special section
This fixes some issues if tcpdump is invoked a second time.
Diffstat (limited to '')
-rw-r--r--freebsd/contrib/tcpdump/util-print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/freebsd/contrib/tcpdump/util-print.c b/freebsd/contrib/tcpdump/util-print.c
index 8a995534..ef1454a1 100644
--- a/freebsd/contrib/tcpdump/util-print.c
+++ b/freebsd/contrib/tcpdump/util-print.c
@@ -323,6 +323,9 @@ ts_print(netdissect_options *ndo,
struct tm *tm;
time_t Time;
char buf[TS_BUF_SIZE];
+#ifdef __rtems__
+ __section(".rtemsrwset.bsd_prog_tcpdump.content")
+#endif /* __rtems__ */
static struct timeval tv_ref;
struct timeval tv_result;
int negative_offset;
@@ -510,6 +513,9 @@ tok2str(register const struct tok *lp, register const char *fmt,
register u_int v)
{
static char buf[4][TOKBUFSIZE];
+#ifdef __rtems__
+ __section(".rtemsrwset.bsd_prog_tcpdump.content")
+#endif /* __rtems__ */
static int idx = 0;
char *ret;