X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=libevent%2Fevent_iocp.c;h=4321281002b7816012f4014a42242a55e8cd51fa;hp=254ed90dcfe4feadb954d889c659b17e9a9291ec;hb=3a84db87064922ad10ac10cc1d6833380e575995;hpb=caad56fb97ea14d8b64df8879f68fe82175aa54f diff --git a/libevent/event_iocp.c b/libevent/event_iocp.c index 254ed90d..43212810 100644 --- a/libevent/event_iocp.c +++ b/libevent/event_iocp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2010 Niels Provos, Nick Mathewson + * Copyright (c) 2009-2012 Niels Provos, Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,6 +24,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _WIN32_WINNT +/* Minimum required for InitializeCriticalSectionAndSpinCount */ +#define _WIN32_WINNT 0x0403 +#endif #include #include #include @@ -179,7 +183,7 @@ event_iocp_port_launch(int n_cpus) if (n_cpus <= 0) n_cpus = N_CPUS_DEFAULT; port->n_threads = n_cpus * 2; - port->threads = calloc(port->n_threads, sizeof(HANDLE)); + port->threads = mm_calloc(port->n_threads, sizeof(HANDLE)); if (!port->threads) goto err;