Skip to content

Fix build error on FreeBSD-AMD64#103

Merged
billziss-gh merged 1 commit into
winfsp:masterfrom
UmerAhmad211:master
May 18, 2026
Merged

Fix build error on FreeBSD-AMD64#103
billziss-gh merged 1 commit into
winfsp:masterfrom
UmerAhmad211:master

Conversation

@UmerAhmad211
Copy link
Copy Markdown
Contributor

Fixes the issue #102 by adding syscall wrappers in port_*.go files

Comment thread examples/passthrough/passthrough.go Outdated
@@ -1,3 +1,4 @@
//go:build darwin || freebsd || netbsd || openbsd || linux
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove. I understand that modern go tools change this automatically, but I would like minimal diffs.

Comment thread examples/passthrough/passthrough.go Outdated
defer setuidgid()()
path = filepath.Join(self.root, path)
return errno(syscall.Mknod(path, mode, int(dev)))
errc = errno(syscall_Mknod(path, mode, dev))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this: return errno(syscall_Mknod(path, mode, dev))

Comment thread examples/passthrough/port_darwin.go Outdated
@@ -1,3 +1,4 @@
//go:build darwin
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.


func syscall_Mknod(path string, mode uint32, dev uint64) error {
return syscall.Mknod(path, mode, int(dev))
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct.

Comment thread examples/passthrough/port_freebsd.go Outdated
@@ -1,3 +1,4 @@
//go:build freebsd
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.


func syscall_Mknod(path string, mode uint32, dev uint64) error {
return syscall.Mknod(path, mode, int(dev))
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct.

Comment thread examples/passthrough/port_netbsd.go Outdated
@@ -1,3 +1,4 @@
//go:build netbsd
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.


func syscall_Mknod(path string, mode uint32, dev uint64) error {
return syscall.Mknod(path, mode, int(dev))
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct.

Comment thread examples/passthrough/port_openbsd.go Outdated
@@ -1,3 +1,4 @@
//go:build openbsd
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.


func syscall_Mknod(path string, mode uint32, dev uint64) error {
return syscall.Mknod(path, mode, int(dev))
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct.

@billziss-gh
Copy link
Copy Markdown
Collaborator

Can you please also squish all commits into a single one?

@billziss-gh billziss-gh merged commit efb69ea into winfsp:master May 18, 2026
6 checks passed
@billziss-gh
Copy link
Copy Markdown
Collaborator

Thank you. I have merged this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants