From 72e8fe4e89162370dce4742f1b69ebfec3ac3928 Mon Sep 17 00:00:00 2001 From: Saya Sugiura Date: Mon, 11 May 2020 14:07:08 +0900 Subject: network trace: Include necessary headers Some components which links dlt seem to depend on following headers, which will be included by mqueue.h. - sys/types.h - fcntl.h So explicitly include them if mqueue interface is not supported in dlt_user.h. Also two headers are removed if dlt_used.h is included. Signed-off-by: Saya Sugiura --- include/dlt/dlt_user.h | 3 +++ src/console/dlt-control.c | 2 -- src/daemon/dlt_daemon_client.c | 2 -- src/daemon/dlt_daemon_common.c | 2 -- src/daemon/dlt_daemon_serial.c | 2 -- src/daemon/dlt_daemon_socket.c | 2 -- src/tests/dlt-test-client.c | 2 -- src/tests/dlt-test-multi-process-client.c | 2 -- src/tests/dlt-test-stress-client.c | 2 -- 9 files changed, 3 insertions(+), 16 deletions(-) diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 41484b6..a3741fa 100644 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -76,6 +76,9 @@ #ifdef DLT_NETWORK_TRACE_ENABLE # include +#else +# include +# include #endif # include diff --git a/src/console/dlt-control.c b/src/console/dlt-control.c index d1edba9..190793a 100644 --- a/src/console/dlt-control.c +++ b/src/console/dlt-control.c @@ -54,8 +54,6 @@ #include /* for isprint() */ #include /* for atoi() */ -#include /* for S_IRUSR, S_IWUSR, S_IRGRP, S_IROTH */ -#include /* for open() */ #include /* for writev() */ #include /* for open() */ diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index c47c808..3560910 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -33,7 +33,6 @@ #include /* for atoi() and exit() */ #include /* for memset() */ #include /* for close() */ -#include #include #include #include @@ -42,7 +41,6 @@ #ifdef linux # include #endif -#include #include #if defined(linux) && defined(__NR_statx) # include diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index d96d8f2..f628cd5 100644 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -71,9 +71,7 @@ #include #include #include -#include -#include /* send() */ #include /* send() */ #include "dlt_types.h" diff --git a/src/daemon/dlt_daemon_serial.c b/src/daemon/dlt_daemon_serial.c index 4cdd7b4..36b7990 100644 --- a/src/daemon/dlt_daemon_serial.c +++ b/src/daemon/dlt_daemon_serial.c @@ -57,9 +57,7 @@ #include #include #include -#include -#include /* send() */ #include /* send() */ #include "dlt-daemon.h" diff --git a/src/daemon/dlt_daemon_socket.c b/src/daemon/dlt_daemon_socket.c index a2cf08a..50bf68e 100644 --- a/src/daemon/dlt_daemon_socket.c +++ b/src/daemon/dlt_daemon_socket.c @@ -34,7 +34,6 @@ #include /* for atoi() and exit() */ #include /* for memset() */ #include /* for close() */ -#include #include #include #include @@ -44,7 +43,6 @@ #ifdef linux # include #endif -#include #include #if defined(linux) && defined(__NR_statx) # include diff --git a/src/tests/dlt-test-client.c b/src/tests/dlt-test-client.c index 5f5a884..e969df9 100644 --- a/src/tests/dlt-test-client.c +++ b/src/tests/dlt-test-client.c @@ -68,8 +68,6 @@ #include /* for isprint() */ #include /* for atoi() */ -#include /* for S_IRUSR, S_IWUSR, S_IRGRP, S_IROTH */ -#include /* for open() */ #include /* for strcmp() */ #include /* for writev() */ diff --git a/src/tests/dlt-test-multi-process-client.c b/src/tests/dlt-test-multi-process-client.c index 0e51b92..f263374 100644 --- a/src/tests/dlt-test-multi-process-client.c +++ b/src/tests/dlt-test-multi-process-client.c @@ -48,9 +48,7 @@ #include #include #include -#include #include -#include /* DLT Library includes */ #include "dlt_client.h" diff --git a/src/tests/dlt-test-stress-client.c b/src/tests/dlt-test-stress-client.c index 505c056..0a4c101 100644 --- a/src/tests/dlt-test-stress-client.c +++ b/src/tests/dlt-test-stress-client.c @@ -67,8 +67,6 @@ #include /* for isprint() */ #include /* for atoi() */ -#include /* for S_IRUSR, S_IWUSR, S_IRGRP, S_IROTH */ -#include /* for open() */ #include /* for strcmp() */ #include /* for writev() */ -- cgit v1.2.1