Skip to content

Commit 094ebd2

Browse files
committed
Build fix for Windows
1 parent cdc9321 commit 094ebd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/mysql2/client.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,15 +893,17 @@ static VALUE rb_mysql_client_server_info(VALUE self) {
893893
*
894894
* Return the file descriptor number for this client.
895895
*/
896-
static VALUE rb_mysql_client_socket(VALUE self) {
897896
#ifndef _WIN32
897+
static VALUE rb_mysql_client_socket(VALUE self) {
898898
GET_CLIENT(self);
899899
REQUIRE_CONNECTED(wrapper);
900900
return INT2NUM(wrapper->client->net.fd);
901+
}
901902
#else
903+
static VALUE rb_mysql_client_socket(RB_MYSQL_UNUSED VALUE self) {
902904
rb_raise(cMysql2Error, "Raw access to the mysql file descriptor isn't supported on Windows");
903-
#endif
904905
}
906+
#endif
905907

906908
/* call-seq:
907909
* client.last_id

0 commit comments

Comments
 (0)