diff --git a/libraries/libstratosphere/include/stratosphere/socket/socket_types.hpp b/libraries/libstratosphere/include/stratosphere/socket/socket_types.hpp index b9bd3a0bf..5d54dda64 100644 --- a/libraries/libstratosphere/include/stratosphere/socket/socket_types.hpp +++ b/libraries/libstratosphere/include/stratosphere/socket/socket_types.hpp @@ -167,7 +167,11 @@ namespace ams::socket { int ai_family; int ai_socktype; int ai_protocol; + #if defined(ATMOSPHERE_OS_WINDOWS) + int ai_addrlen; + #else socklen_t ai_addrlen; + #endif struct sockaddr *ai_addr; struct ares_addrinfo_node *ai_next; }; diff --git a/libraries/libstratosphere/source/util/zstd.inc b/libraries/libstratosphere/source/util/zstd.inc index 72ea32f00..ba2708cab 100644 --- a/libraries/libstratosphere/source/util/zstd.inc +++ b/libraries/libstratosphere/source/util/zstd.inc @@ -46857,12 +46857,14 @@ size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, /*-************************************* * Dependencies ***************************************/ -/* qsort_r is an extension. */ -#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__gnu_linux__) || \ - defined(__CYGWIN__) || defined(__MSYS__) -#if !defined(_GNU_SOURCE) && !defined(__ANDROID__) /* NDK doesn't ship qsort_r(). */ -#define _GNU_SOURCE -#endif +/* qsort_r is an extension. + * + * Android NDK does not ship qsort_r(). + */ +#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__CYGWIN__) || defined(__MSYS__) +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif #endif #include /* fprintf */ @@ -47799,7 +47801,7 @@ static void stableSort(COVER_ctx_t *ctx) { qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), ctx, (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), (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), ctx);