Skip to content

Commit ec2723c

Browse files
committed
smb: fix compatibility with ming
1 parent 06e5fc2 commit ec2723c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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

0 commit comments

Comments
 (0)