Skip to content

Commit

Permalink
Build fix for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Sep 8, 2015
1 parent cdc9321 commit 094ebd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/mysql2/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,15 +893,17 @@ static VALUE rb_mysql_client_server_info(VALUE self) {
*
* Return the file descriptor number for this client.
*/
static VALUE rb_mysql_client_socket(VALUE self) {
#ifndef _WIN32
static VALUE rb_mysql_client_socket(VALUE self) {
GET_CLIENT(self);
REQUIRE_CONNECTED(wrapper);
return INT2NUM(wrapper->client->net.fd);
}
#else
static VALUE rb_mysql_client_socket(RB_MYSQL_UNUSED VALUE self) {
rb_raise(cMysql2Error, "Raw access to the mysql file descriptor isn't supported on Windows");
#endif
}
#endif

/* call-seq:
* client.last_id
Expand Down

0 comments on commit 094ebd2

Please sign in to comment.