Message ID | 20250128124026.108992-1-frank@lichtenheld.com |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,v1] Haiku: Fix short interface path length | expand |
I'm not totally happy with another #ifdef added to that already-not-so-nice #orgy, but I see no more elegant way. One might consider to move the #define IFNAMSIZ further up, and use it in the "iface[16]" definition (getting rid of one #ifdef)... but that's somewhat outside the scope of this patch, so maybe I'll give it a go ;-) Your patch has been applied to the master branch. commit 34f302247c865827b7075422e32c272a203783cb Author: Alexander von Gluck Date: Tue Jan 28 13:40:26 2025 +0100 Haiku: Fix short interface path length Signed-off-by: Alexander von Gluck <alex@terarocket.io> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> Message-Id: <20250128124026.108992-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30654.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/route.h b/src/openvpn/route.h index 421e7d2..69b06b8 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -155,6 +155,8 @@ /* gateway interface */ #ifdef _WIN32 DWORD adapter_index; /* interface or ~0 if undefined */ +#elif defined(TARGET_HAIKU) + char iface[PATH_MAX]; /* iface names are full /dev path with driver name */ #else char iface[16]; /* interface name (null terminated), may be empty */ #endif @@ -186,8 +188,13 @@ #else /* non linux platform don't have this constant defined */ #ifndef IFNAMSIZ +#if defined(TARGET_HAIKU) +/* iface names are full /dev path with driver name */ +#define IFNAMSIZ PATH_MAX +#else #define IFNAMSIZ 16 #endif +#endif char iface[IFNAMSIZ]; /* interface name (null terminated), may be empty */ #endif