--- /dev/null
+diff -ur zabbix-6.0.19.orig/src/go/Makefile.am zabbix-6.0.19/src/go/Makefile.am
+--- zabbix-6.0.19.orig/src/go/Makefile.am 2023-06-27 09:11:01.000000000 +0200
++++ zabbix-6.0.19/src/go/Makefile.am 2023-07-20 16:29:58.932599626 +0200
+@@ -49,10 +49,10 @@
+ all: build
+
+ zabbix.com/cmd/zabbix_agent2:
+- CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
++ CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -mod=vendor -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_agent2
+
+ zabbix.com/cmd/zabbix_web_service:
+- go build -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_web_service
++ go build -mod=vendor -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin zabbix.com/cmd/zabbix_web_service
+
+ build: ${TARGETS}
+
+@@ -61,8 +61,8 @@
+ rm -f bin/zabbix_agent2 bin/mock_server
+
+ install-zabbix.com/cmd/zabbix_agent2:
+- CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" GOBIN=${GOBIN} \
+- go install -ldflags="${AGENT_GOLDFLAGS}" ${TARGETS}
++ CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" GOBIN=${DESTDIR}${GOBIN} \
++ go install -mod=vendor -ldflags="${AGENT_GOLDFLAGS}" ${TARGETS}
+ $(MKDIR_P) "$(DESTDIR)$(AGENT2_CONFIG_PLUGINS_PATH)"
+ test -f "$(DESTDIR)$(AGENT2_CONFIG_FILE)" || cp "conf/zabbix_agent2.conf" "$(DESTDIR)$(AGENT2_CONFIG_FILE)"
+ for cfg in conf/zabbix_agent2.d/plugins.d/*.conf; do \
+@@ -71,7 +71,7 @@
+ done
+
+ install-zabbix.com/cmd/zabbix_web_service:
+- GOBIN=${GOBIN} go install -ldflags="${WEBSERVICE_GOLDFLAGS}" zabbix.com/cmd/zabbix_web_service
++ GOBIN=${DESTDIR}${GOBIN} go install -mod=vendor -ldflags="${WEBSERVICE_GOLDFLAGS}" zabbix.com/cmd/zabbix_web_service
+
+ install-exec-local: ${INSTALL_TARGETS}
+