diff --git a/tests/bandwidth-server-one.c b/tests/bandwidth-server-one.c index 09dd3f2..7a02751 100644 --- a/tests/bandwidth-server-one.c +++ b/tests/bandwidth-server-one.c @@ -1,5 +1,5 @@ /* - * Copyright © 2008-2010 Stéphane Raimbault + * Copyright © 2008-2012 Stéphane Raimbault * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,12 +22,13 @@ #include #include #include -#if !defined(_WIN32) -#define closesocket(s) close(s) -#endif #include +#if defined(_WIN32) +#define close closesocket +#endif + enum { TCP, RTU @@ -91,7 +92,7 @@ int main(int argc, char *argv[]) printf("Quit the loop: %s\n", modbus_strerror(errno)); modbus_mapping_free(mb_mapping); - closesocket(socket); + close(socket); modbus_free(ctx); return 0;