From 5c5df61071412773fbf21adcf498a4942d23d92b Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 3 Jun 2019 08:20:00 +0200 Subject: [PATCH] Additional platform definitions for sparc64 (#11387) * lib/posix: Define SO_REUSEPORT for sparc64 as 0x0200 from kernel ABI * lib/system: Add platform support for sparc64 --- lib/posix/posix_other.nim | 2 +- lib/system/platforms.nim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim index 261550d96e..04071b75fe 100644 --- a/lib/posix/posix_other.nim +++ b/lib/posix/posix_other.nim @@ -546,7 +546,7 @@ else: when defined(linux) or defined(nimdoc): when defined(alpha) or defined(mips) or defined(mipsel) or defined(mips64) or defined(mips64el) or defined(parisc) or - defined(sparc) or defined(nimdoc): + defined(sparc) or defined(sparc64) or defined(nimdoc): const SO_REUSEPORT* = cint(0x0200) ## Multiple binding: load balancing on incoming TCP connections ## or UDP packets. (Requires Linux kernel > 3.9) diff --git a/lib/system/platforms.nim b/lib/system/platforms.nim index 80a21cd0b7..1c35eeb0d0 100644 --- a/lib/system/platforms.nim +++ b/lib/system/platforms.nim @@ -20,6 +20,7 @@ type powerpc64, ## 64 bit PowerPC powerpc64el, ## Little Endian 64 bit PowerPC sparc, ## Sparc based processor + sparc64, ## 64-bit Sparc based processor ia64, ## Intel Itanium amd64, ## x86_64 (AMD64); 64 bit x86 compatible CPU mips, ## Mips based processor @@ -76,6 +77,7 @@ const elif defined(powerpc64): CpuPlatform.powerpc64 elif defined(powerpc64el): CpuPlatform.powerpc64el elif defined(sparc): CpuPlatform.sparc + elif defined(sparc64): CpuPlatform.sparc64 elif defined(ia64): CpuPlatform.ia64 elif defined(amd64): CpuPlatform.amd64 elif defined(mips): CpuPlatform.mips