I am writing a program in C that uses winsock and I am using the command fcntl to make the receive call nonblocking and I am getting the following errors.
warning C4013: 'fcntl' undefined; assuming extern returning int
error C2065: 'F_SETFL' : undeclared identifier
error C2065: 'F_GETFL' : undeclared identifier
error C2065: 'F_SETFL' : undeclared identifier
error C2065: 'O_NDELAY' : undeclared identifier
error C2065: 'EWOULDBLOCK' : undeclared identifierenter code here
I am including the winsock2.h header file in my code as follows
#pragma comment(lib,"ws2_32.lib")
#include <winsock2.h>
Please help me out. Thanks in advance.