Skip to content

Commit 607adcf

Browse files
authored
Fix build tags for isRealProc function (#560)
Only aix, darwin, dragonfly freebsd and linux GOOS have a Type member in their syscall.Statfs_t struct. However, since the isRealProc compares that Type to a magic number (PROC_SUPER_MAGIC, 0x9fa0) which is only relevant to Linux (and possibly FreeBSD with Linux compatibility), adjust build tags accordingly. This drops the previous nostatfs build tag workaround, since the "tamago" GOOS for which it was originally added won't match the updated build tags. Fixes: #554. Signed-off-by: Daniel Swarbrick <[email protected]>
1 parent a5ae62f commit 607adcf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fs_statfs_notype.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build netbsd || openbsd || solaris || windows || nostatfs
15-
// +build netbsd openbsd solaris windows nostatfs
14+
//go:build !freebsd && !linux
15+
// +build !freebsd,!linux
1616

1717
package procfs
1818

fs_statfs_type.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build !netbsd && !openbsd && !solaris && !windows && !nostatfs
15-
// +build !netbsd,!openbsd,!solaris,!windows,!nostatfs
14+
//go:build freebsd || linux
15+
// +build freebsd linux
1616

1717
package procfs
1818

0 commit comments

Comments
 (0)