You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description
If I use monitor middleware and try to build my project on macOS using LLVM/Clang 11.0 or higher (in my case 12.0.0), I get the following error:
# github.com/gofiber/fiber/v2/internal/gopsutil/cpu
../../Go/pkg/mod/github.com/gofiber/fiber/v2@v2.20.1/internal/gopsutil/cpu/cpu_darwin_cgo.go:13:5: warning: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_]
Proposed Solution
Based on this issue it seems adding #include <TargetConditionals.h> before using TARGET_OS_MAC solves the problem.
As a workaround calling CGO_CFLAGS=-Wno-undef-prefix go build remove the warning message.
The text was updated successfully, but these errors were encountered:
Fiber version
v2.20.1
Issue description
If I use monitor middleware and try to build my project on macOS using LLVM/Clang 11.0 or higher (in my case 12.0.0), I get the following error:
Code snippet
Proposed Solution
Based on this issue it seems adding
#include <TargetConditionals.h>
before usingTARGET_OS_MAC
solves the problem.As a workaround calling
CGO_CFLAGS=-Wno-undef-prefix go build
remove the warning message.The text was updated successfully, but these errors were encountered: