ValdikSS / GoodbyeDPI

GoodbyeDPI — Deep Packet Inspection circumvention utility (for Windows)

Home Page:https://ntc.party/c/community-software/goodbyedpi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error on windows with MSYS2 MINGW32

AlawamiAZ opened this issue · comments

Operating system / операционная система

W11 22H2

Running as service / Запуск программы как сервис

I run it as a regular program / Запускаю программу обычным образом

Describe the bug / Опишите ошибку программы

When compiling goodbyedpi on windows using MSYS2 MinGW32 with this command:
make CPREFIX=x86_64-w64-mingw32- BIT64=1 WINDIVERTHEADERS=windivert/include WINDIVERTLIBS=windivert/x64
it gives the following error:

$ make CPREFIX="" BIT64=1 WINDIVERTHEADERS=windivert/include WINDIVERTLIBS=windivert/x64
gcc -std=c99 -pie -fPIE -pipe -Iwindivert/include -Lwindivert/x64 -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wall -Wextra -Wpedantic -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-security -Wno-format-nonliteral -Wshadow -Wstrict-aliasing=1 -Wnull-dereference -Warray-bounds=2 -Wimplicit-fallthrough=3 -Wstringop-overflow=4 -Wformat-signedness -Wstrict-overflow=2 -Wcast-align=strict -Wfloat-equal -Wcast-align -Wsign-conversion  -c fakepackets.c -o fakepackets.o
In file included from fakepackets.c:7:
windivert/include/windivert.h:164:6: warning: ISO C99 doesn’t support unnamed structs/unions [-Wpedantic]
  164 |     };
      |      ^
fakepackets.c: In function ‘send_fake_data’:
fakepackets.c:73:14: error: ‘WINDIVERT_ADDRESS’ has no member named ‘PseudoTCPChecksum’; did you mean ‘TCPChecksum’?
   73 |     addr_new.PseudoTCPChecksum = 0;
      |              ^~~~~~~~~~~~~~~~~
      |              TCPChecksum
fakepackets.c:74:14: error: ‘WINDIVERT_ADDRESS’ has no member named ‘PseudoIPChecksum’; did you mean ‘IPChecksum’?
   74 |     addr_new.PseudoIPChecksum = 0;
      |              ^~~~~~~~~~~~~~~~
      |              IPChecksum
fakepackets.c:79:31: warning: passing argument 7 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   79 |             NULL, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                               ^~~~~~~~~
      |                               |
      |                               struct <anonymous> **
windivert/include/windivert.h:509:39: note: expected ‘struct <anonymous> **’ but argument is of type ‘struct <anonymous> **’
  509 |     __out_opt   PWINDIVERT_ICMPV6HDR *ppIcmpv6Hdr,
      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
fakepackets.c:79:48: warning: passing argument 9 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   79 |             NULL, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                                                ^~~~~~~~~~~~
      |                                                |
      |                                                void **
windivert/include/windivert.h:511:36: note: expected ‘struct <anonymous> **’ but argument is of type ‘void **’
  511 |     __out_opt   PWINDIVERT_UDPHDR *ppUdpHdr,
      |                 ~~~~~~~~~~~~~~~~~~~^~~~~~~~
fakepackets.c:79:62: warning: passing argument 10 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   79 |             NULL, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                                                              ^~~~~~~~~~~~~~~
      |                                                              |
      |                                                              UINT * {aka unsigned int *}
windivert/include/windivert.h:512:24: note: expected ‘void **’ but argument is of type ‘UINT *’ {aka ‘unsigned int *’}
  512 |     __out_opt   PVOID *ppData,
      |                 ~~~~~~~^~~~~~
fakepackets.c:78:14: error: too few arguments to function ‘WinDivertHelperParsePacket’
   78 |         if (!WinDivertHelperParsePacket(packet_fake, packetLen, &ppIpHdr,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
windivert/include/windivert.h:502:29: note: declared here
  502 | extern WINDIVERTEXPORT BOOL WinDivertHelperParsePacket(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
fakepackets.c:85:37: warning: passing argument 7 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   85 |             &ppIpV6Hdr, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                                     ^~~~~~~~~
      |                                     |
      |                                     struct <anonymous> **
windivert/include/windivert.h:509:39: note: expected ‘struct <anonymous> **’ but argument is of type ‘struct <anonymous> **’
  509 |     __out_opt   PWINDIVERT_ICMPV6HDR *ppIcmpv6Hdr,
      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
fakepackets.c:85:54: warning: passing argument 9 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   85 |             &ppIpV6Hdr, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                                                      ^~~~~~~~~~~~
      |                                                      |
      |                                                      void **
windivert/include/windivert.h:511:36: note: expected ‘struct <anonymous> **’ but argument is of type ‘void **’
  511 |     __out_opt   PWINDIVERT_UDPHDR *ppUdpHdr,
      |                 ~~~~~~~~~~~~~~~~~~~^~~~~~~~
fakepackets.c:85:68: warning: passing argument 10 of ‘WinDivertHelperParsePacket’ from incompatible pointer type [-Wincompatible-pointer-types]
   85 |             &ppIpV6Hdr, NULL, NULL, &ppTcpHdr, NULL, &packet_data, &packet_dataLen))
      |                                                                    ^~~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    UINT * {aka unsigned int *}
windivert/include/windivert.h:512:24: note: expected ‘void **’ but argument is of type ‘UINT *’ {aka ‘unsigned int *’}
  512 |     __out_opt   PVOID *ppData,
      |                 ~~~~~~~^~~~~~
fakepackets.c:84:14: error: too few arguments to function ‘WinDivertHelperParsePacket’
   84 |         if (!WinDivertHelperParsePacket(packet_fake, packetLen, NULL,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
windivert/include/windivert.h:502:29: note: declared here
  502 | extern WINDIVERTEXPORT BOOL WinDivertHelperParsePacket(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
fakepackets.c:134:9: warning: passing argument 4 of ‘WinDivertSend’ from incompatible pointer type [-Wincompatible-pointer-types]
  134 |         &addr_new, NULL
      |         ^~~~~~~~~
      |         |
      |         WINDIVERT_ADDRESS *
windivert/include/windivert.h:265:23: note: expected ‘UINT *’ {aka ‘unsigned int *’} but argument is of type ‘WINDIVERT_ADDRESS *’
  265 |     __out_opt   UINT *pSendLen,
      |                 ~~~~~~^~~~~~~~
make: *** [Makefile:43: fakepackets.o] Error 1

Additional information / Дополнительная информация

No response

Use WinDivert 1.4.3 or older.
https://reqrypt.org/download/