Skip to contentSkip to conversation

Change in openvpn[master]: Add missing includes for C files and their own headers

Openvpn-devel In review Frank Lichtenheld (Code Review) via Openvpn-devel 2 participants 7 messages Oct 6 – Oct 7 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1791289136000.I33b246dea9eb9383e1ca928e1330ba840b7f990c@gerrit.openvpn.net

#1 lore raw

Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email

to review the following change.

Change subject: Add missing includes for C files and their own headers
......................................................................

Add missing includes for C files and their own headers

We don't strictly need those, but it is much better to have them since the compiler will then ensure that we do not have subtle differences between declarations and definitions.

Also fix
- socks.h not being able to be included on its own
- open_tun_afunix stub for Windows having wrong parameters

Change-Id I33b246dea9eb9383e1ca928e1330ba840b7f990c

---
M src/openvpn/comp-lz4.c
M src/openvpn/cryptoapi.c
M src/openvpn/dco_win.c
M src/openvpn/socks.c
M src/openvpn/socks.h
M src/openvpn/tun_afunix.c
M tests/unit_tests/openvpn/siphash_openssl.c

7 files changed, 9 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/84/1984/1

src/openvpn/comp-lz4.c +1 -0
index 48797b0..57c6bb3 100644
@@ -31,6 +31,7 @@
 #include <lz4.h>
 
 #include "comp.h"
+#include "comp-lz4.h"
 #include "error.h"
 
 #include "memdbg.h"
src/openvpn/cryptoapi.c +1 -0
index ad2706c..ef3c94c 100644
@@ -47,6 +47,7 @@
 #include <ctype.h>
 
 #include "buffer.h"
+#include "cryptoapi.h"
 #include "openssl_compat.h"
 #include "win32.h"
 #include "xkey_common.h"
src/openvpn/dco_win.c +1 -0
index c230a90..6e5e295 100644
@@ -27,6 +27,7 @@
 #include "syshead.h"
 
 #include "dco.h"
+#include "dco_win.h"
 #include "forward.h"
 #include "tun.h"
 #include "crypto.h"
src/openvpn/socks.c +1 -0
index 65ecb3c..b84da24 100644
@@ -34,6 +34,7 @@
 
 #include "syshead.h"
 
+#include "socks.h"
 #include "common.h"
 #include "misc.h"
 #include "win32.h"
src/openvpn/socks.h +2 -0
index 846113d..caed18c 100644
@@ -29,6 +29,8 @@
 #define SOCKS_H
 
 #include "buffer.h"
+#include "interval.h"
+#include "sig.h"
 
 struct openvpn_sockaddr;
 struct link_socket_actual;
src/openvpn/tun_afunix.c +2 -2
index a67a472..f494d42 100644
@@ -35,6 +35,7 @@
 #include "argv.h"
 #include "options.h"
 #include "socket.h"
+#include "tun_afunix.h"
 
 #ifndef WIN32
 /* Windows does implement some AF_UNIX functionality but key features
@@ -172,8 +173,7 @@
 }
 #else  /* ifndef WIN32 */
 void
-open_tun_afunix(const char *dev, const char *dev_type, int mtu, struct tuntap *tt,
-                struct env_set env)
+open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *orig_env)
 {
     msg(M_ERR, "AF_UNIX socket support not available on this platform");
 }
tests/unit_tests/openvpn/siphash_openssl.c +1 -0
index 99a7763..52f13b8 100644
@@ -26,6 +26,7 @@
 #endif
 
 #include "siphash.h"
+#include "siphash_openssl.h"
 
 #ifdef ENABLE_CRYPTO_OPENSSL
 #include <openssl/opensslv.h>
Signature · 13 lines
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33b246dea9eb9383e1ca928e1330ba840b7f990c
Gerrit-Change-Number: 1984
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: Arne Schwabe, Frank Lichtenheld.

Răzvan Cojocaru has posted comments on this change by Frank Lichtenheld. ( https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email )

Change subject: Add missing includes for C files and their own headers
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33b246dea9eb9383e1ca928e1330ba840b7f990c
Gerrit-Change-Number: 1984
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Frank Lichtenheld <[email protected]>
Gerrit-Comment-Date: Tue, 06 Oct 2026 13:15:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#3 lore raw

PATCH 1/1 Add missing includes for C files and their own headers

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]>

We don't strictly need those, but it is much better to have them since the compiler will then ensure that we do not have subtle differences between declarations and definitions.

Also fix
- socks.h not being able to be included on its own
- open_tun_afunix stub for Windows having wrong parameters

Change-Id I33b246dea9eb9383e1ca928e1330ba840b7f990c

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1984
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1984
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <[email protected]>

src/openvpn/comp-lz4.c +1 -0
index 48797b0..57c6bb3 100644
@@ -31,6 +31,7 @@
 #include <lz4.h>
 
 #include "comp.h"
+#include "comp-lz4.h"
 #include "error.h"
 
 #include "memdbg.h"
src/openvpn/cryptoapi.c +1 -0
index ad2706c..ef3c94c 100644
@@ -47,6 +47,7 @@
 #include <ctype.h>
 
 #include "buffer.h"
+#include "cryptoapi.h"
 #include "openssl_compat.h"
 #include "win32.h"
 #include "xkey_common.h"
src/openvpn/dco_win.c +1 -0
index c230a90..6e5e295 100644
@@ -27,6 +27,7 @@
 #include "syshead.h"
 
 #include "dco.h"
+#include "dco_win.h"
 #include "forward.h"
 #include "tun.h"
 #include "crypto.h"
src/openvpn/socks.c +1 -0
index 65ecb3c..b84da24 100644
@@ -34,6 +34,7 @@
 
 #include "syshead.h"
 
+#include "socks.h"
 #include "common.h"
 #include "misc.h"
 #include "win32.h"
src/openvpn/socks.h +2 -0
index 846113d..caed18c 100644
@@ -29,6 +29,8 @@
 #define SOCKS_H
 
 #include "buffer.h"
+#include "interval.h"
+#include "sig.h"
 
 struct openvpn_sockaddr;
 struct link_socket_actual;
src/openvpn/tun_afunix.c +2 -2
index a67a472..f494d42 100644
@@ -35,6 +35,7 @@
 #include "argv.h"
 #include "options.h"
 #include "socket.h"
+#include "tun_afunix.h"
 
 #ifndef WIN32
 /* Windows does implement some AF_UNIX functionality but key features
@@ -172,8 +173,7 @@
 }
 #else  /* ifndef WIN32 */
 void
-open_tun_afunix(const char *dev, const char *dev_type, int mtu, struct tuntap *tt,
-                struct env_set env)
+open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *orig_env)
 {
     msg(M_ERR, "AF_UNIX socket support not available on this platform");
 }
tests/unit_tests/openvpn/siphash_openssl.c +1 -0
index 99a7763..52f13b8 100644
@@ -26,6 +26,7 @@
 #endif
 
 #include "siphash.h"
+#include "siphash_openssl.h"
 
 #ifdef ENABLE_CRYPTO_OPENSSL
 #include <openssl/opensslv.h>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Acked-by Razvan Cojocaru on v1 1/1
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Add missing includes for C files and their own headers

Uh, yes... :-)

Your patch has been applied to the master and release/2.7 branch.

commit a1c4187364f14dc267becbcbdf60f16354d9d70b (master) commit b7a7f1c2e7a5c00ac082321e22fdabde252b1059 (release/2.7)

Author: Frank Lichtenheld
Date:   Tue Oct 6 15:20:06 2026 +0200

Add missing includes for C files and their own headers

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1984
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39737.html

--
kind regards,

Gert Doering

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#5 lore raw
In reply to a message not in the archive

Attention is currently required from: Arne Schwabe, Frank Lichtenheld.

Hello Arne Schwabe, Răzvan Cojocaru,

I'd like you to reexamine a change. Please visit

    https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email

to look at the new patch set (#2).

The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.

Change subject: Add missing includes for C files and their own headers
......................................................................

Add missing includes for C files and their own headers

We don't strictly need those, but it is much better to have them since the compiler will then ensure that we do not have subtle differences between declarations and definitions.

Also fix
- socks.h not being able to be included on its own
- open_tun_afunix stub for Windows having wrong parameters

Change-Id I33b246dea9eb9383e1ca928e1330ba840b7f990c

---
M src/openvpn/comp-lz4.c
M src/openvpn/cryptoapi.c
M src/openvpn/dco_win.c
M src/openvpn/socks.c
M src/openvpn/socks.h
M src/openvpn/tun_afunix.c
M tests/unit_tests/openvpn/siphash_openssl.c

7 files changed, 9 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/84/1984/2

src/openvpn/comp-lz4.c +1 -0
index 48797b0..57c6bb3 100644
@@ -31,6 +31,7 @@
 #include <lz4.h>
 
 #include "comp.h"
+#include "comp-lz4.h"
 #include "error.h"
 
 #include "memdbg.h"
src/openvpn/cryptoapi.c +1 -0
index ad2706c..ef3c94c 100644
@@ -47,6 +47,7 @@
 #include <ctype.h>
 
 #include "buffer.h"
+#include "cryptoapi.h"
 #include "openssl_compat.h"
 #include "win32.h"
 #include "xkey_common.h"
src/openvpn/dco_win.c +1 -0
index c230a90..6e5e295 100644
@@ -27,6 +27,7 @@
 #include "syshead.h"
 
 #include "dco.h"
+#include "dco_win.h"
 #include "forward.h"
 #include "tun.h"
 #include "crypto.h"
src/openvpn/socks.c +1 -0
index 65ecb3c..b84da24 100644
@@ -34,6 +34,7 @@
 
 #include "syshead.h"
 
+#include "socks.h"
 #include "common.h"
 #include "misc.h"
 #include "win32.h"
src/openvpn/socks.h +2 -0
index 846113d..caed18c 100644
@@ -29,6 +29,8 @@
 #define SOCKS_H
 
 #include "buffer.h"
+#include "interval.h"
+#include "sig.h"
 
 struct openvpn_sockaddr;
 struct link_socket_actual;
src/openvpn/tun_afunix.c +2 -2
index a67a472..f494d42 100644
@@ -35,6 +35,7 @@
 #include "argv.h"
 #include "options.h"
 #include "socket.h"
+#include "tun_afunix.h"
 
 #ifndef WIN32
 /* Windows does implement some AF_UNIX functionality but key features
@@ -172,8 +173,7 @@
 }
 #else  /* ifndef WIN32 */
 void
-open_tun_afunix(const char *dev, const char *dev_type, int mtu, struct tuntap *tt,
-                struct env_set env)
+open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *orig_env)
 {
     msg(M_ERR, "AF_UNIX socket support not available on this platform");
 }
tests/unit_tests/openvpn/siphash_openssl.c +1 -0
index 99a7763..52f13b8 100644
@@ -26,6 +26,7 @@
 #endif
 
 #include "siphash.h"
+#include "siphash_openssl.h"
 
 #ifdef ENABLE_CRYPTO_OPENSSL
 #include <openssl/opensslv.h>

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33b246dea9eb9383e1ca928e1330ba840b7f990c
Gerrit-Change-Number: 1984
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Frank Lichtenheld <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#6 lore raw
In reply to a message not in the archive

Gert Doering has submitted this change. ( https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email )

Change subject: Add missing includes for C files and their own headers
......................................................................

Add missing includes for C files and their own headers

We don't strictly need those, but it is much better to have them since the compiler will then ensure that we do not have subtle differences between declarations and definitions.

Also fix
- socks.h not being able to be included on its own
- open_tun_afunix stub for Windows having wrong parameters

Change-Id I33b246dea9eb9383e1ca928e1330ba840b7f990c

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1984
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39737.html

---
M src/openvpn/comp-lz4.c
M src/openvpn/cryptoapi.c
M src/openvpn/dco_win.c
M src/openvpn/socks.c
M src/openvpn/socks.h
M src/openvpn/tun_afunix.c
M tests/unit_tests/openvpn/siphash_openssl.c

7 files changed, 9 insertions(+), 2 deletions(-)
src/openvpn/comp-lz4.c +1 -0
index 48797b0..57c6bb3 100644
@@ -31,6 +31,7 @@
 #include <lz4.h>
 
 #include "comp.h"
+#include "comp-lz4.h"
 #include "error.h"
 
 #include "memdbg.h"
src/openvpn/cryptoapi.c +1 -0
index ad2706c..ef3c94c 100644
@@ -47,6 +47,7 @@
 #include <ctype.h>
 
 #include "buffer.h"
+#include "cryptoapi.h"
 #include "openssl_compat.h"
 #include "win32.h"
 #include "xkey_common.h"
src/openvpn/dco_win.c +1 -0
index c230a90..6e5e295 100644
@@ -27,6 +27,7 @@
 #include "syshead.h"
 
 #include "dco.h"
+#include "dco_win.h"
 #include "forward.h"
 #include "tun.h"
 #include "crypto.h"
src/openvpn/socks.c +1 -0
index 65ecb3c..b84da24 100644
@@ -34,6 +34,7 @@
 
 #include "syshead.h"
 
+#include "socks.h"
 #include "common.h"
 #include "misc.h"
 #include "win32.h"
src/openvpn/socks.h +2 -0
index 846113d..caed18c 100644
@@ -29,6 +29,8 @@
 #define SOCKS_H
 
 #include "buffer.h"
+#include "interval.h"
+#include "sig.h"
 
 struct openvpn_sockaddr;
 struct link_socket_actual;
src/openvpn/tun_afunix.c +2 -2
index a67a472..f494d42 100644
@@ -35,6 +35,7 @@
 #include "argv.h"
 #include "options.h"
 #include "socket.h"
+#include "tun_afunix.h"
 
 #ifndef WIN32
 /* Windows does implement some AF_UNIX functionality but key features
@@ -172,8 +173,7 @@
 }
 #else  /* ifndef WIN32 */
 void
-open_tun_afunix(const char *dev, const char *dev_type, int mtu, struct tuntap *tt,
-                struct env_set env)
+open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *orig_env)
 {
     msg(M_ERR, "AF_UNIX socket support not available on this platform");
 }
tests/unit_tests/openvpn/siphash_openssl.c +1 -0
index 99a7763..52f13b8 100644
@@ -26,6 +26,7 @@
 #endif
 
 #include "siphash.h"
+#include "siphash_openssl.h"
 
 #ifdef ENABLE_CRYPTO_OPENSSL
 #include <openssl/opensslv.h>

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33b246dea9eb9383e1ca928e1330ba840b7f990c
Gerrit-Change-Number: 1984
Gerrit-PatchSet: 3
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#7 lore raw
In reply to a message not in the archive

Gert Doering has uploaded a new patch set (#3) to the change originally created by Frank Lichtenheld. ( https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Răzvan Cojocaru

Change subject: Add missing includes for C files and their own headers
......................................................................

Add missing includes for C files and their own headers

We don't strictly need those, but it is much better to have them since the compiler will then ensure that we do not have subtle differences between declarations and definitions.

Also fix
- socks.h not being able to be included on its own
- open_tun_afunix stub for Windows having wrong parameters

Change-Id I33b246dea9eb9383e1ca928e1330ba840b7f990c

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1984
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39737.html

---
M src/openvpn/comp-lz4.c
M src/openvpn/cryptoapi.c
M src/openvpn/dco_win.c
M src/openvpn/socks.c
M src/openvpn/socks.h
M src/openvpn/tun_afunix.c
M tests/unit_tests/openvpn/siphash_openssl.c

7 files changed, 9 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/84/1984/3

src/openvpn/comp-lz4.c +1 -0
index 48797b0..57c6bb3 100644
@@ -31,6 +31,7 @@
 #include <lz4.h>
 
 #include "comp.h"
+#include "comp-lz4.h"
 #include "error.h"
 
 #include "memdbg.h"
src/openvpn/cryptoapi.c +1 -0
index ad2706c..ef3c94c 100644
@@ -47,6 +47,7 @@
 #include <ctype.h>
 
 #include "buffer.h"
+#include "cryptoapi.h"
 #include "openssl_compat.h"
 #include "win32.h"
 #include "xkey_common.h"
src/openvpn/dco_win.c +1 -0
index c230a90..6e5e295 100644
@@ -27,6 +27,7 @@
 #include "syshead.h"
 
 #include "dco.h"
+#include "dco_win.h"
 #include "forward.h"
 #include "tun.h"
 #include "crypto.h"
src/openvpn/socks.c +1 -0
index 65ecb3c..b84da24 100644
@@ -34,6 +34,7 @@
 
 #include "syshead.h"
 
+#include "socks.h"
 #include "common.h"
 #include "misc.h"
 #include "win32.h"
src/openvpn/socks.h +2 -0
index 846113d..caed18c 100644
@@ -29,6 +29,8 @@
 #define SOCKS_H
 
 #include "buffer.h"
+#include "interval.h"
+#include "sig.h"
 
 struct openvpn_sockaddr;
 struct link_socket_actual;
src/openvpn/tun_afunix.c +2 -2
index a67a472..f494d42 100644
@@ -35,6 +35,7 @@
 #include "argv.h"
 #include "options.h"
 #include "socket.h"
+#include "tun_afunix.h"
 
 #ifndef WIN32
 /* Windows does implement some AF_UNIX functionality but key features
@@ -172,8 +173,7 @@
 }
 #else  /* ifndef WIN32 */
 void
-open_tun_afunix(const char *dev, const char *dev_type, int mtu, struct tuntap *tt,
-                struct env_set env)
+open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *orig_env)
 {
     msg(M_ERR, "AF_UNIX socket support not available on this platform");
 }
tests/unit_tests/openvpn/siphash_openssl.c +1 -0
index 99a7763..52f13b8 100644
@@ -26,6 +26,7 @@
 #endif
 
 #include "siphash.h"
+#include "siphash_openssl.h"
 
 #ifdef ENABLE_CRYPTO_OPENSSL
 #include <openssl/opensslv.h>

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33b246dea9eb9383e1ca928e1330ba840b7f990c
Gerrit-Change-Number: 1984
Gerrit-PatchSet: 3
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel