Coder Social home page Coder Social logo

No longer compiles on plan9 about procfs HOT 3 CLOSED

ncw avatar ncw commented on May 27, 2024
No longer compiles on plan9

from procfs.

Comments (3)

discordianfish avatar discordianfish commented on May 27, 2024

We need to move the types to a platform dependent file I guess.

from procfs.

dswarbrick avatar dswarbrick commented on May 27, 2024

fs_statfs_type.go was initially checked in with build tags:

//go:build !netbsd && !openbsd && !solaris

and now has even more verbose tags:

//go:build !netbsd && !openbsd && !solaris && !windows && !nostatfs

!plan9 could be added to these, but maybe it's more concise to specify the GOOS values which do support Statfs_t.

GOOS which have a syscall.Statfs() func: aix, darwin, dragonfly, freebsd, linux, openbsd.
GOOS which have a syscall.Statfs_t struct containing a Type member: aix, darwin, dragonfly, freebsd, linux.

Note the absence of openbsd in the latter. The intersection of those GOOS may be used as the build tags for fs_statfs_type.go, i.e.

//go:build aix || darwin || dragonfly || freebsd || linux

However, the isRealProc() function compares stat.Type to a magic number (PROC_SUPER_MAGIC, 0x9fa0), which is highly likely to be Linux-specific. It is defined on FreeBSD due to its Linux compatibility layer, but I'm skeptical that it would be defined (or relevant) on AIX, Darwin or DragonFly BSD.

I'm leaning towards the opinion that this function should be built on Linux (and maybe FreeBSD) only.

from procfs.

bozkayasalihx avatar bozkayasalihx commented on May 27, 2024

I had same issue too

from procfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.