libstrat: fix building for windows target

This commit is contained in:
hexkyz committed 2026-10-11 22:59:40 +01:00
1 parent eccd393126
commit c7e6c35e90
2 files changed
+13 -7

No files matched your search

@@ -167,7 +167,11 @@ namespace ams::socket {
int ai_family; int ai_family;
int ai_socktype; int ai_socktype;
int ai_protocol; int ai_protocol;
#if defined(ATMOSPHERE_OS_WINDOWS)
int ai_addrlen;
#else
socklen_t ai_addrlen; socklen_t ai_addrlen;
#endif
struct sockaddr *ai_addr; struct sockaddr *ai_addr;
struct ares_addrinfo_node *ai_next; struct ares_addrinfo_node *ai_next;
}; };
@@ -46857,12 +46857,14 @@ size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx,
/*-************************************* /*-*************************************
* Dependencies * Dependencies
***************************************/ ***************************************/
/* qsort_r is an extension. */ /* qsort_r is an extension.
#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__gnu_linux__) || \ *
defined(__CYGWIN__) || defined(__MSYS__) * Android NDK does not ship qsort_r().
#if !defined(_GNU_SOURCE) && !defined(__ANDROID__) /* NDK doesn't ship qsort_r(). */ */
#define _GNU_SOURCE #if (defined(__linux__) && !defined(__ANDROID__)) || defined(__CYGWIN__) || defined(__MSYS__)
#endif # ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
#endif #endif
#include <stdio.h> /* fprintf */ #include <stdio.h> /* fprintf */
@@ -47799,7 +47801,7 @@ static void stableSort(COVER_ctx_t *ctx) {
qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32),
ctx, ctx,
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
#elif defined(_GNU_SOURCE) #elif (defined(__linux__) && !defined(__ANDROID__)) || defined(__CYGWIN__) || defined(__MSYS__)
qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32),
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp),
ctx); ctx);