broadcom-wl-6.30.223.271-debian-fix-dkms-build-error.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Roger Shimizu <rosh@debian.org>
  2. Date: Fri, 17 Apr 2020 00:08:34 +0900
  3. Subject: Parse KERNELRELEASE into VERSION, PATCHLEVEL, and SUBLEVEL
  4. This fixes build error message:
  5. ====
  6. /bin/sh: 1: [: Illegal number:
  7. /bin/sh: 1: [: Illegal number:
  8. Wireless Extension is the only possible API for this kernel version
  9. Using Wireless Extension API
  10. ====
  11. Closes: #886512
  12. ---
  13. Makefile | 4 ++++
  14. 1 files changed, 4 insertions(+)
  15. diff --git a/amd64/Makefile b/amd64/Makefile
  16. index 994a146..ed16dfc 100644
  17. --- a/Makefile
  18. +++ b/Makefile
  19. @@ -20,6 +20,10 @@
  20. ifneq ($(KERNELRELEASE),)
  21. + VERSION := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\1/')
  22. + PATCHLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\2/')
  23. + SUBLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\3/')
  24. +
  25. LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
  26. if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" -o "$(VERSION)" -ge "3" ]; then \
  27. echo TRUE; \