Skip to contentSkip to conversation

Fix #elif TARGET_LINUX missing defined() call

PATCH In review Arne Schwabe 2 participants 2 messages Mar 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix #elif TARGET_LINUX missing defined() call

I found this when playing with building OpenVPN with cmake.

---
 src/openvpn/tun.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/tun.h +1 -1
index 9d995dd46..902665cc6 100644
@@ -130,7 +130,7 @@ struct tuntap_options {
     int dns6_len;
 };
 
-#elif TARGET_LINUX
+#elif defined(TARGET_LINUX)
 
 struct tuntap_options {
     int txqueuelen;
Signature · 1 line
2.30.1
Acked-by on v1 1/1
#1 lore raw

Not sure why it is not erroring-out there, but "symbol not defined" seems to be good enough as "0". OTOH, all the other code uses "#ifdef" or "defined(TARGET_FOO)", so bringing this in line is good.

Your patch has been applied to the master branch.

commit d11c273b07c422dde358e1b1caafd12bf8682e70

Author: Arne Schwabe
Date:   Sun Mar 28 16:36:33 2021 +0200
     Fix #elif TARGET_LINUX missing defined() call

     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]/msg21884.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering