aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/0033-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
blob: 2234e32e519cdc70440c9594a669271c24f5d99c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 38e7c12086acae4507f9d5067f947431a28c34db Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 30 Aug 2020 18:01:03 +0200
Subject: [PATCH 33/39] gcc-go: Use int64 type as offset argument for mmap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Taken from Adélie Linux.
---
 libgo/go/runtime/mem_gccgo.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
index ba38ebaa9ab..3c9e5ce9461 100644
--- a/libgo/go/runtime/mem_gccgo.go
+++ b/libgo/go/runtime/mem_gccgo.go
@@ -15,7 +15,7 @@ import (
 //go:linkname sysFree
 
 //extern mmap
-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer
 
 //extern munmap
 func munmap(addr unsafe.Pointer, length uintptr) int32
@@ -37,7 +37,7 @@ func init() {
 	}
 }
 
-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
+func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) {
 	p := sysMmap(addr, n, prot, flags, fd, off)
 	if uintptr(p) == _MAP_FAILED {
 		return nil, errno()
-- 
2.28.0