Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win compilation errors #12

Open
frequenc1 opened this issue Feb 29, 2024 · 1 comment
Open

win compilation errors #12

frequenc1 opened this issue Feb 29, 2024 · 1 comment
Assignees

Comments

@frequenc1
Copy link

I'm working on a DMX plugin for vcv rack using your awesome library. It's working great on macOS but I'm getting some build problems on win64 build via my actions build on GitHub. I'm using https://github.com/VCVRack/rack-plugin-toolchain to build and they use a common pattern where both the windows and linux builds are done in an ubuntu docker container. My first issue is files are case sensitive on linux so the inclusion of :

#include <WinSock2.h> breaks as the file needs to be for both
#include <winsock2.h>
#include <basetsd.h>

2nd I'm hitting this cascade of errors:

src/clients/e131.c: In function 'e131_unicast_dest':
src/clients/e131.c:81:24: error: storage size of 'hints' isn't known
   81 |   struct addrinfo *ai, hints;
      |                        ^~~~~
src/clients/e131.c:84:7: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
   84 |   if (getaddrinfo(host, NULL, &hints, &ai) != 0) {
      |       ^~~~~~~~~~~
src/clients/e131.c:91:45: error: invalid use of undefined type 'struct addrinfo'
   91 |   dest->sin_addr = ((struct sockaddr_in *)ai->ai_addr)->sin_addr;
      |                                             ^~
src/clients/e131.c:95:3: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration]
   95 |   freeaddrinfo(ai);

On win64 build it can't calculate the sizeof hints. Any thoughts on how to proceed?

// get the address info of the host (the results are a linked list)
struct addrinfo *ai, hints;
memset(&hints, 0, sizeof hints);

@hhromic
Copy link
Owner

hhromic commented Mar 10, 2024

Apologies for the slow reply, I was on holidays last week :)
I will take a look on this, thanks for reporting!

@hhromic hhromic self-assigned this Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants