]> The Tcpdump Group git mirrors - libpcap/commitdiff
Cast the result of _beginthreadex() to HANDLE.
authorGuy Harris <[email protected]>
Fri, 10 Nov 2017 21:18:53 +0000 (13:18 -0800)
committerGuy Harris <[email protected]>
Fri, 10 Nov 2017 21:18:53 +0000 (13:18 -0800)
rpcapd/daemon.c
rpcapd/rpcapd.c

index dc931652c2967ff163f6bfaa114edb4f6d47d4fd..ae3caec630df1e44bc0c76e58bf0744d219e8b23 100755 (executable)
@@ -1692,7 +1692,7 @@ static int daemon_msg_startcap_req(struct daemon_slpars *pars, uint32 plen, int
 
        // Now we have to create a new thread to receive packets
 #ifdef _WIN32
-       *threaddata = _beginthreadex(NULL, 0, daemon_thrdatamain, (void *) session, NULL, 0);
+       *threaddata = (HANDLE)_beginthreadex(NULL, 0, daemon_thrdatamain, (void *) session, NULL, 0);
        if (*threaddata == 0)
        {
                pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread");
index 0f0f5805bda8c084a702c53b19313796d797afcb..539651a815252c355bca5df1e55bfd7ee8210d92 100755 (executable)
@@ -329,7 +329,7 @@ void main_startup(void)
                activelist[i].ai_family = mainhints.ai_family;
 
 #ifdef _WIN32
-               threadId = _beginthreadex(NULL, 0, main_active,
+               threadId = (HANDLE)_beginthreadex(NULL, 0, main_active,
                    (void *)&activelist[i], 0, NULL);
                if (threadId == 0)
                {
@@ -393,7 +393,7 @@ void main_startup(void)
                        *socktemp = sockmain;
 
 #ifdef _WIN32
-                       threadId = _beginthreadex(NULL, 0, main_passive,
+                       threadId = (HANDLE)_beginthreadex(NULL, 0, main_passive,
                            (void *) socktemp, 0, NULL);
                        if (threadId == 0)
                        {