nixcloud / ip2unix

Turn IP sockets into Unix domain sockets
GNU Lesser General Public License v3.0
357 stars 10 forks source link

fix building with gcc-12 #30

Closed etam closed 1 year ago

etam commented 2 years ago
Index: ip2unix-2.1.4/src/dynports/dynports.cc
===================================================================
--- ip2unix-2.1.4.orig/src/dynports/dynports.cc
+++ ip2unix-2.1.4/src/dynports/dynports.cc
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: LGPL-3.0-only
+#include <array>
 #include <stdexcept>
 #include <sys/types.h>
 #include <unistd.h>

Otherwise it fails to compile with error:

src/dynports.cc:13:45: error: variable ‘constexpr const std::array<short unsigned int, 4576> PORT_OFFSETS’ has initializer but incomplete type
   13 | static constexpr std::array<uint16_t, 4576> PORT_OFFSETS {{
      |                                             ^~~~~~~~~~~~