fix_openbsd_network_kernel.patch raw

   1  Fix compiling on OpenBSD
   2  
   3  1. The `net/if_types.h` header does not define the `IFT_STF` symbol.
   4  2. The `netinet6/in6_var.h` header defines some of the used symbols.
   5  
   6  For the reference, see:
   7   - https://codeberg.org/OpenBSD/ports/src/commit/f8f1aedbe8aff550c69930b5d92b9c392e298382/x11/qt6/qtbase/patches/patch-src_network_kernel_qnetworkinterface_unix_cpp
   8  
   9  
  10  --- a/qtbase/src/network/kernel/qnetworkinterface_unix.cpp
  11  +++ b/qtbase/src/network/kernel/qnetworkinterface_unix.cpp
  12  @@ -392,6 +392,9 @@ QT_BEGIN_INCLUDE_NAMESPACE
  13   #  include <net/if_media.h>
  14   #  include <net/if_types.h>
  15   #  include <netinet/in_var.h>
  16  +#  ifdef Q_OS_OPENBSD
  17  +#    include <netinet6/in6_var.h>
  18  +#  endif
  19   #endif // QT_PLATFORM_UIKIT
  20   QT_END_INCLUDE_NAMESPACE
  21   
  22  @@ -419,7 +422,9 @@ static QNetworkInterface::InterfaceType probeIfType(int socket, int iftype, stru
  23           return QNetworkInterface::Ieee1394;
  24   
  25       case IFT_GIF:
  26  +#ifndef Q_OS_OPENBSD
  27       case IFT_STF:
  28  +#endif
  29           return QNetworkInterface::Virtual;
  30       }
  31   
  32