diff options
author | Martin Szulecki | 2015-01-29 20:35:25 +0100 |
---|---|---|
committer | Martin Szulecki | 2015-01-29 20:35:25 +0100 |
commit | 5a8c59a0bb47dfabaa2089f1e39f48313b1fa5a3 (patch) | |
tree | 29f720d865ef47adb7d446561dcd9fe3885f7cfc /src | |
parent | ce144ce298d4588758ffe2f10998f88d0c6b07c0 (diff) | |
download | libirecovery-5a8c59a0bb47dfabaa2089f1e39f48313b1fa5a3.tar.gz libirecovery-5a8c59a0bb47dfabaa2089f1e39f48313b1fa5a3.tar.bz2 |
Rename some variables to prevent collision with "interface" type on WIN32
Diffstat (limited to 'src')
-rw-r--r-- | src/libirecovery.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index e150e84..f53ca45 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -36,7 +36,6 @@ #else #define WIN32_LEAN_AND_MEAN #include <windows.h> -#undef interface #include <setupapi.h> #define _FMT_qX "%I64X" #define _FMT_016llx "%016I64x" @@ -59,9 +58,9 @@ struct irecv_client_private { int debug; - int config; - int interface; - int alt_interface; + int usb_config; + int usb_interface; + int usb_alt_interface; unsigned int mode; struct irecv_device_info device_info; #ifndef WIN32 @@ -798,7 +797,7 @@ IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned l } memset(client, '\0', sizeof(struct irecv_client_private)); - client->interface = 0; + client->usb_interface = 0; client->handle = usb_handle; client->mode = usb_descriptor.idProduct; @@ -887,7 +886,7 @@ IRECV_API irecv_error_t irecv_usb_set_configuration(irecv_client_t client, int c } } - client->config = configuration; + client->usb_config = configuration; #endif return IRECV_E_SUCCESS; @@ -911,8 +910,8 @@ IRECV_API irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_i return IRECV_E_USB_INTERFACE; } #endif - client->interface = usb_interface; - client->alt_interface = usb_alt_interface; + client->usb_interface = usb_interface; + client->usb_alt_interface = usb_alt_interface; return IRECV_E_SUCCESS; } @@ -1023,7 +1022,7 @@ IRECV_API irecv_error_t irecv_close(irecv_client_t client) { #ifndef WIN32 if (client->handle != NULL) { if ((client->mode != IRECV_K_DFU_MODE) && (client->mode != IRECV_K_WTF_MODE)) { - libusb_release_interface(client->handle, client->interface); + libusb_release_interface(client->handle, client->usb_interface); } libusb_close(client->handle); client->handle = NULL; |