Browse code

Merge pull request #42869 from pete-woods/backport-quota-package-cgo-fix

[20.10 backport] quota: adjust build-tags to allow build without CGO

Sebastiaan van Stijn authored on 2021/10/05 04:10:12
Showing 2 changed files
... ...
@@ -396,9 +396,9 @@ func getDirFd(dir *C.DIR) uintptr {
396 396
 	return uintptr(C.dirfd(dir))
397 397
 }
398 398
 
399
-// Get the backing block device of the driver home directory
400
-// and create a block device node under the home directory
401
-// to be used by quotactl commands
399
+// makeBackingFsDev gets the backing block device of the driver home directory
400
+// and creates a block device node under the home directory to be used by
401
+// quotactl commands.
402 402
 func makeBackingFsDev(home string) (string, error) {
403 403
 	var stat unix.Stat_t
404 404
 	if err := unix.Stat(home, &stat); err != nil {
... ...
@@ -1,4 +1,4 @@
1
-// +build linux
1
+// +build linux,!exclude_disk_quota,cgo
2 2
 
3 3
 package quota // import "github.com/docker/docker/quota"
4 4