I am trying to get struct pollfd to work. I have defined it in poll.h exactly how it is in winsock2.h, changed my int poll() function to int WSApoll() to conform to the declaration in Winsock2, made sure Winsock2 and WS2tcpip come before windows.h and tried EVERY configuration imaginable. I am at a loss. I keep getting pollfd 'struct' type redefinition in my poll.h file and a use of undefined type 'pollfd' in my cpp file. The commented parts are part of my multiple attempts and the common.h used to house Winsock2.h, WS2tcpip.h and Windows.h. Any thoughts? I have tried not putting the struct in poll.h, which then gives me a 2019 linker error, I have tried so many different ways to fix this that I can't even remember them all at this point. Any help at all is appreciated - TIA!
I apologize, I tried repeatedly to get the code tag to work, but it wouldn't yesterday - I thought it was broken. It worked today though, probably some user error on my part - I blame Monday!
2) from MikeyBoy: pollfd is defined and I am trying to use it from Winsock2, but I am getting an error telling me that I am trying to redefine it, but as far as I can tell from all examples and the way it is written in Winsock2.h, I'm not. That's why I am confused.