fixes for building with MSVC

This commit is contained in:
YuguoZhang
2025-05-24 14:05:09 +08:00
committed by Steffen Jaeckel
parent f8cda0f65c
commit 79066d797b
8 changed files with 22 additions and 7 deletions

View File

@@ -20,11 +20,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef _WIN32
#include <conio.h>
#include <ctype.h>
#else
#include <unistd.h>
#endif
#include <strophe.h>

View File

@@ -13,7 +13,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef _WIN32
#include <conio.h>
@@ -23,6 +22,7 @@
#include <iphlpapi.h>
#include <mstcpip.h> /* tcp_keepalive */
#else
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

View File

@@ -11,11 +11,16 @@
*/
#include <assert.h>
#include <libgen.h> /* basename */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <strophe.h>
#ifndef _WIN32
#include <libgen.h> /* basename */
#else
#define strtok_r strtok_s
#define basename(x) "vcard"
#endif
typedef struct {
xmpp_ctx_t *ctx;