criu/0002-Fix-build-with-nftables-installed-in-different-direc.patch
Takashi Iwai ed0c6841f8 Accepting request 1091121 from home:tiwai:branches:devel:tools
- Update to criu 3.18:
  New features:
  * Allow CRIU to be used as non-root
  * Add SIGTSTP support
  * Add opt to skip file r/w/x check on restore
  Bugfixes:
  * Many fixes here and there
  Improvements:
  * cgroup2: Dump cgroup controllers of every threads in a process
  * save IP_FREEBIND option for SOCK_RAW sockets also
  * support IP_PKTINFO and IPV6_RECVPKTINFO options
  * Implement hw breakpoint for arm64 platform
  * Set only used XFEATURE_* in xstate_bv
  * Checkpoint and restore some global properties
  * A checkpoint optimization for highly sparse ghost files (--ghost-fiemap)
- Refresh criu-py-install-fix.diff:
  a workaround for non-working python-pip inside build environment by
  reviving the old setup script
- Fix shebang of criu-ns script:
  criu-ns-python3-shebang.patch
- Drop obsoleted patches:
  criu-fix-conflicting-headers.patch
  mount-add-definition-for-FSOPEN_CLOEXEC.patch

OBS-URL: https://build.opensuse.org/request/show/1091121
OBS-URL: https://build.opensuse.org/package/show/devel:tools/criu?expand=0&rev=117
2023-06-06 16:26:28 +00:00

43 lines
1.8 KiB
Diff

From 95191250537d1cd872668647da76234241f16661 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 1 Dec 2020 16:32:19 +0100
Subject: [PATCH] Fix build with nftables installed in different directory
The cflags needs to be passed to the build test.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
Makefile.config | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/Makefile.config
+++ b/Makefile.config
@@ -38,13 +38,16 @@ else
endif
ifeq ($(call pkg-config-check,libnftables),y)
+ CFLAGS_NFTABLES := $(shell $(PKG_CONFIG) --cflags libnftables)
LIB_NFTABLES := $(shell $(PKG_CONFIG) --libs libnftables)
- ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(LIB_NFTABLES)),true)
+ ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(CFLAGS_NFTABLES) $(LIB_NFTABLES)),true)
LIBS_FEATURES += $(LIB_NFTABLES)
FEATURE_DEFINES += -DCONFIG_HAS_NFTABLES_LIB_API_0
- else ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_1),$(LIB_NFTABLES)),true)
+ FEATURE_CFLAGS += $(CFLAGS_NFTABLES)
+ else ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_1),$(CFLAGS_NFTABLES) $(LIB_NFTABLES)),true)
LIBS_FEATURES += $(LIB_NFTABLES)
FEATURE_DEFINES += -DCONFIG_HAS_NFTABLES_LIB_API_1
+ FEATURE_CFLAGS += $(CFLAGS_NFTABLES)
else
$(warning Warn: you have libnftables installed but it has incompatible API)
$(warning Warn: Building without nftables support)
@@ -75,7 +78,7 @@ endif
endif
export DEFINES += $(FEATURE_DEFINES)
-export CFLAGS += $(FEATURE_DEFINES)
+export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW MEMFD_CREATE \