Skip to content

Commit

Permalink
Merge pull request #794 from 212dandan/master
Browse files Browse the repository at this point in the history
Build on loong64
  • Loading branch information
bai authored Oct 30, 2023
2 parents 7f1751c + 9b5e9ee commit 4a05b20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions core/open_out_log_linux_loong64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//go:build linux && loong64
// +build linux,loong64

// Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version
// 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

package core

import (
"syscall"
)

// linux_loong64 doesn't have syscall.Dup2, so use
// the nearly identical syscall.Dup3 instead
func internalDup2(oldfd uintptr, newfd uintptr) error {
return syscall.Dup3(int(oldfd), int(newfd), 0)
}
3 changes: 2 additions & 1 deletion core/open_out_log_unix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//go:build !windows && !(linux && arm64)
//go:build !windows && !(linux && arm64) && !(linux && loong64)
// +build !windows
// +build !linux !arm64
// +build !linux !loong64

// Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version
// 2.0 (the "License"); you may not use this file except in compliance with
Expand Down

0 comments on commit 4a05b20

Please sign in to comment.