Remove unistd.h from unit test
PATCH v2 1/1 Remove unistd.h from unit test
the unit tests do not compile under Windows since Windows does not provide a unistd.h header. The header is still included on Unix platforms via syshead.h
Signed-off-by Arne Schwabe <[email protected]...>
--- tests/unit_tests/openvpn/test_argv.c | 1 - tests/unit_tests/openvpn/test_auth_token.c | 1 - tests/unit_tests/openvpn/test_crypto.c | 1 - tests/unit_tests/openvpn/test_misc.c | 1 - tests/unit_tests/openvpn/test_ncp.c | 1 - tests/unit_tests/openvpn/test_tls_crypt.c | 1 - 6 files changed, 6 deletions(-)
tests/unit_tests/openvpn/test_argv.c +0 -1
@@ -2,7 +2,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_auth_token.c +0 -1
@@ -30,7 +30,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_crypto.c +0 -1
@@ -30,7 +30,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_misc.c +0 -1
@@ -30,7 +30,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_ncp.c +0 -1
@@ -30,7 +30,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_tls_crypt.c +0 -1
@@ -30,7 +30,6 @@#include "syshead.h" #include <stdio.h> -#include <unistd.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>
Signature · 1 line
2.32.0
Acked-by Gert Doering <[email protected]...>
That was an easy one for a change :-)
We should make our mind on all the other includes, though - like <stdio.h>, <stdlib.h>, <stdarg.h> - they come via "syshead.h" as well today, and are included another time in all the test_*.c files.
Did not do windows compilation, but tested Linux and FreeBSD, and (unsurprisingly) no change wrt the unit tests.
Your patch has been applied to the master branch.
commit f9dbf645fa5b6fdda06abebedbed772a83d8f0d9
Author: Arne Schwabe Date: Mon Aug 2 12:07:40 2021 +0200
Remove unistd.h from unit test
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22685.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering