Skip to content

Commit 52ce39a

Browse files
committed
smb: fix compatibility with ming
1 parent e4682b9 commit 52ce39a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

deps/libsmb2/include/asprintf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define inline __inline
1414
#endif
1515

16-
#ifndef _XBOX
16+
#if !defined(_XBOX) && !defined(__MINGW32__)
1717
#ifndef _vscprintf
1818
/* For some reason, MSVC fails to honour this #ifndef. */
1919
/* Hence function renamed to _vscprintf_so(). */
@@ -28,6 +28,7 @@ static inline int _vscprintf_so(const char * format, va_list pargs) {
2828
#endif /* _vscprintf */
2929
#endif
3030

31+
#if !defined(__MINGW32__)
3132
#ifndef vasprintf
3233
static inline int vasprintf(char **strp, const char *fmt, va_list ap) {
3334
#ifdef _XBOX
@@ -61,5 +62,6 @@ static inline int asprintf(char *strp[], const char *fmt, ...) {
6162
return r;
6263
}
6364
#endif /* asprintf */
65+
#endif
6466

6567
#endif /* ! _ASPRINTF_H_ */

deps/libsmb2/lib/compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ typedef unsigned int uintptr_t;
115115
#define EBADF WSAENOTSOCK
116116
#endif
117117

118-
#if defined(_XBOX) || defined(__MINGW32__)
118+
#if defined(_XBOX) // || defined(__MINGW32__)
119119
#define snprintf _snprintf
120120
int gethostname(char* name, size_t len);
121121
#endif

deps/libsmb2/lib/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ connect_async_ai(struct smb2_context *smb2, const struct addrinfo *ai, int *fd_o
12091209
#endif
12101210

12111211
if (connect(fd, (struct sockaddr *)&ss, socksize) != 0
1212-
#ifndef _MSC_VER
1212+
#ifndef _WIN32
12131213
&& errno != EINPROGRESS) {
12141214
#else
12151215
&& WSAGetLastError() != WSAEWOULDBLOCK) {

0 commit comments

Comments
 (0)