diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-11-06 10:25:23 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-11-07 12:46:52 +0100 |
commit | 93bce404c19652b40f2104633286b6dac5f85b0e (patch) | |
tree | 4b2e0181432348d4ce20e60233d55e6b20917eb2 | |
parent | c938d8a93e2561df1a4ac7897327456e97babb8c (diff) | |
download | passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar.gz passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar.bz2 passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar.lz passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar.xz passt-93bce404c19652b40f2104633286b6dac5f85b0e.tar.zst passt-93bce404c19652b40f2104633286b6dac5f85b0e.zip |
Makefile: Move NETNS_RUN_DIR definition to C code
NETNS_RUN_DIR is set in the Makefile, then passed into the C code with
-D. But NETNS_RUN_DIR is just a fixed string, it doesn't depend on any
make probes or variables, so there's really no reason to handle it via the
Makefile. Just move it to a plain #define in conf.c.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | conf.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -44,7 +44,6 @@ FLAGS := -Wall -Wextra -Wno-format-zero-length FLAGS += -pedantic -std=c11 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE FLAGS += $(FORTIFY_FLAG) -O2 -pie -fPIE FLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE) -FLAGS += -DNETNS_RUN_DIR=\"/run/netns\" FLAGS += -DPASST_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH) FLAGS += -DRLIMIT_STACK_VAL=$(RLIMIT_STACK_VAL) FLAGS += -DARCH=\"$(TARGET_ARCH)\" @@ -46,6 +46,8 @@ #include "isolation.h" #include "log.h" +#define NETNS_RUN_DIR "/run/netns" + /** * next_chunk - Return the next piece of a string delimited by a character * @s: String to search |