//go:build !unix || aix || solaris

package hotnews

import (
	"errors"
	"os"
)

var errCacheRootLockUnsupported = errors.New(
	"hotnews disk cache root locking is unsupported on this platform",
)

var cacheRootLockUnsupported = errCacheRootLockUnsupported

// Platforms without a cross-process flock must not pretend that an in-process
// mutex protects pathname replacement. Returning unsupported deterministically
// disables disk caching while the handler continues through upstream.
var acquireCacheRootLock = func(_ *os.File) (func() error, error) {
	return nil, errCacheRootLockUnsupported
}
