Error: mysql_com.h|268|error: expected specifier-qualifier-list before 'SOCKET'|
Posted by: Roman Griego
Date: October 14, 2011 04:01AM

Hello, I am compiling an app in C and get the above error.

...mysql_com.h|268|error: expected specifier-qualifier-list before 'SOCKET'|

which points to a typedef struct:

typedef struct st_net {
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
Vio *vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
unsigned long remain_in_buf,length, buf_length, where_b;
unsigned long max_packet,max_packet_size;
unsigned int pkt_nr,compress_pkt_nr;
unsigned int write_timeout, read_timeout, retry_count;
int fcntl;
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
my_bool unused1; /* Please remove with the next incompatible ABI change. */
my_bool unused2; /* Please remove with the next incompatible ABI change */
my_bool compress;
my_bool unused3; /* Please remove with the next incompatible ABI change. */
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
*/
#endif
/*
Unused, please remove with the next incompatible ABI change.
*/
unsigned char *unused;
unsigned int last_errno;
unsigned char error;
my_bool unused4; /* Please remove with the next incompatible ABI change. */
my_bool unused5; /* Please remove with the next incompatible ABI change. */
/** Client library error message buffer. Actually belongs to struct MYSQL. */
char last_error[MYSQL_ERRMSG_SIZE];
/** Client library sqlstate buffer. Set along with the error message. */
char sqlstate[SQLSTATE_LENGTH+1];
void *extension;
} NET;

I have included winsock.h, but I cannot get the file to compile yet. What am I missing?

Options: ReplyQuote


Subject
Views
Written By
Posted
Error: mysql_com.h|268|error: expected specifier-qualifier-list before 'SOCKET'|
2487
October 14, 2011 04:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.