solaris systems build fix (#425)

This commit is contained in:
David CARLIER
2021-11-22 09:47:30 +00:00
committed by GitHub
parent 8e5514bd5a
commit e24130137d
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ using namespace snmalloc;
// glibc lacks snprintf_l
#if defined(__linux__) || defined(__OpenBSD__) || defined(__DragonFly__) || \
defined(__HAIKU__)
defined(__HAIKU__) || defined(__sun)
# define snprintf_l(buf, size, loc, msg, ...) \
snprintf(buf, size, msg, __VA_ARGS__)
// Windows has it with an underscore prefix

View File

@@ -4,9 +4,9 @@
#include <test/setup.h>
#include <test/xoroshiro.h>
#include <unordered_set>
#if defined(__linux__) && !defined(SNMALLOC_QEMU_WORKAROUND)
#if (defined(__linux__) || defined(__sun)) && !defined(SNMALLOC_QEMU_WORKAROUND)
/*
* We only test allocations with limited AS on linux for now.
* We only test allocations with limited AS on linux and Solaris for now.
* It should be a good representative for POSIX systems.
* QEMU `setrlimit64` does not behave as the same as native linux,
* so we need to exclude it from such tests.