diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-04-04 13:06:29 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2024-04-04 13:38:18 +0200 |
commit | 7b9996d107217393bac5b3edf6577b74991e02b4 (patch) | |
tree | a416ec9e0765d8186c7e3595a1e0f29867ff7dbf /package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch | |
parent | 6e391325af849df1efe45cf13d284a1b0da0ab74 (diff) | |
download | openwrt-7b9996d107217393bac5b3edf6577b74991e02b4.tar.gz openwrt-7b9996d107217393bac5b3edf6577b74991e02b4.tar.bz2 openwrt-7b9996d107217393bac5b3edf6577b74991e02b4.zip |
hostapd: replace "argument list too long" fix with a simpler version
Less convoluted and more robust
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch')
-rw-r--r-- | package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch b/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch new file mode 100644 index 0000000000..08d4393c90 --- /dev/null +++ b/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch @@ -0,0 +1,23 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Thu, 4 Apr 2024 12:59:41 +0200 +Subject: [PATCH] build: de-duplicate _DIRS before calling mkdir + +If the build path is long, the contents of the _DIRS variable can be very long, +since it repeats the same directories very often. +In some cases, this has triggered an "Argument list too long" build error. + +Suggested-by: Eneas U de Queiroz <cotequeiroz@gmail.com> +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/src/build.rules ++++ b/src/build.rules +@@ -80,7 +80,7 @@ endif + _DIRS := $(BUILDDIR)/$(PROJ) + .PHONY: _make_dirs + _make_dirs: +- @mkdir -p $(_DIRS) ++ @mkdir -p $(sort $(_DIRS)) + + $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs + $(Q)$(CC) -c -o $@ $(CFLAGS) $< |