Skip to content

Commit

Permalink
Fix: prevent dlopen calls when compiled statically (#33485)
Browse files Browse the repository at this point in the history
  • Loading branch information
spikat authored Jan 31, 2025
1 parent b6b1c51 commit e70c16d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/util/system/dlopen_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build linux && cgo
//go:build linux && cgo && !static

package system

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/system/dlopen_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build !linux || !cgo
//go:build !linux || !cgo || static

package system

Expand Down
2 changes: 1 addition & 1 deletion tasks/system_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def build_sysprobe_binary(
ldflags += ' -s -w'

if static:
build_tags.extend(["osusergo", "netgo"])
build_tags.extend(["osusergo", "netgo", "static"])
build_tags = list(set(build_tags).difference({"netcgo"}))

if not is_windows and "pcap" in build_tags:
Expand Down

0 comments on commit e70c16d

Please sign in to comment.