Skip to content

Commit

Permalink
dev-lang/nim: drop MAP_ANONYMOUS constant
Browse files Browse the repository at this point in the history
Fixes build failure on mipsel

Bug: nim-lang/Nim#4853
Reported-by: [email protected]

Package-Manager: portage-2.3.1
  • Loading branch information
Sergei Trofimovich committed Oct 6, 2016
1 parent 1a42e9e commit 8cb2adb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From fe362543de00806a3d69ddd0de33caf0cae2e57e Mon Sep 17 00:00:00 2001
From: GaveUp <[email protected]>
Date: Tue, 4 Oct 2016 10:56:07 -0500
Subject: [PATCH] Revert change to osalloc.nim from commit 8d7a45f.

Change caused MAP_ANONYMOUS to have an incorrect value when compiling
for mipsel.

Fixes #4852.
---
lib/system/osalloc.nim | 2 --
1 file changed, 2 deletions(-)

diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim
index b07a362..316dd74 100644
--- a/lib/system/osalloc.nim
+++ b/lib/system/osalloc.nim
@@ -87,8 +87,6 @@ elif defined(posix):
const MAP_ANONYMOUS = 0x1000
elif defined(solaris):
const MAP_ANONYMOUS = 0x100
- elif defined(linux):
- const MAP_ANONYMOUS = 0x20
else:
var
MAP_ANONYMOUS {.importc: "MAP_ANONYMOUS", header: "<sys/mman.h>".}: cint
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"

PATCHES=("${FILESDIR}"/${P}-fix-mips-build.patch)

nim_use_enable() {
[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
use $1 && echo "-d:$2"
Expand Down

0 comments on commit 8cb2adb

Please sign in to comment.