-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around inability to build Linux CGO on Mac
The combination of CGO and GOOS=Linux breaks compilation on a Mac, which has the result of breaking Vim's compilation error checking. We've worked around this by adding a non-CGO implementation of our single CGO package, which will be used when CGO_ENABLED=0. We're adding that env var setting to our Vim alias in the garden-dotfiles repo. [finishes #139469133] Signed-off-by: Gareth Clay <[email protected]>
- Loading branch information
1 parent
d6daac8
commit fd48c94
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...esystems/overlayxfs/quota/projectquota.go → ...tems/overlayxfs/quota/projectquota_cgo.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// +build linux,!cgo | ||
|
||
// This file is a dummy structure to allow us to compile on a Mac with GOOS=linux | ||
|
||
package quota | ||
|
||
type Quota struct { | ||
Size uint64 | ||
} | ||
|
||
type Control struct { | ||
} | ||
|
||
func NewControl(basePath string) (*Control, error) { | ||
return nil, nil | ||
} | ||
|
||
func (q *Control) SetQuota(targetPath string, quota Quota) error { | ||
return nil | ||
} | ||
|
||
func (q *Control) GetQuota(targetPath string, quota *Quota) error { | ||
return nil | ||
} | ||
|
||
func GetProjectID(targetPath string) (uint32, error) { | ||
return 0, nil | ||
} |