From 014f98fb5f739dda7868b01e26fd67b8f7b8ebbb Mon Sep 17 00:00:00 2001 From: aarzilli Date: Sun, 28 May 2023 13:06:25 +0200 Subject: [PATCH] proc/test: reenable cgo testing on FreeBSD Cgo testing on FreeBSD was accidentally disabled by 4e24209, FreeBSD does not have gcc by default anymore. --- pkg/proc/test/support.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go index c9bd0e3c56..2e882d99ba 100644 --- a/pkg/proc/test/support.go +++ b/pkg/proc/test/support.go @@ -364,8 +364,9 @@ var hasCgo = func() bool { if strings.TrimSpace(string(out)) != "1" { return false } - _, err = exec.LookPath("gcc") - return err == nil + _, err1 := exec.LookPath("gcc") + _, err2 := exec.LookPath("clang") + return (err1 == nil) || (err2 == nil) }() func MustHaveCgo(t *testing.T) {