aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-12-17 13:58:01 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-19 23:18:38 +0100
commit736eee5cc6d9e96f5fae26bd6fcbfdc3d7968166 (patch)
treee88880a3225c5590a2b4311c5937be7c9c4442ee /package/kernel
parentaa08f43cab880d1683d0ad2c970ce91f3405afc7 (diff)
downloadupstream-736eee5cc6d9e96f5fae26bd6fcbfdc3d7968166.tar.gz
upstream-736eee5cc6d9e96f5fae26bd6fcbfdc3d7968166.tar.bz2
upstream-736eee5cc6d9e96f5fae26bd6fcbfdc3d7968166.zip
mt76: Fix compile against glibc
The mt76 test tools did not compile against glibc. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mt76/Makefile2
-rw-r--r--package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch25
2 files changed, 26 insertions, 1 deletions
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index fd39d7a561..8e971f2ada 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mt76
-PKG_RELEASE=2
+PKG_RELEASE=3
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
diff --git a/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch b/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch
new file mode 100644
index 0000000000..71b43a1cb6
--- /dev/null
+++ b/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch
@@ -0,0 +1,25 @@
+From fe89f9bc4055fd6055ce8792a715a40a6c75ba44 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu, 17 Dec 2020 13:54:04 +0100
+Subject: [PATCH] tools: Set mode for new file /tmp/mt76-test-%s
+
+Set the file system mode for the newly created file /tmp/mt76-test-%s,
+this is mandatory according to the man page and fixes a compile error
+with glibc.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ tools/eeprom.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/eeprom.c
++++ b/tools/eeprom.c
+@@ -77,7 +77,7 @@ mt76_eeprom_create_file(void)
+ return -1;
+ }
+
+- fd = open(eeprom_file, O_RDWR | O_CREAT | O_EXCL);
++ fd = open(eeprom_file, O_RDWR | O_CREAT | O_EXCL, 00644);
+ if (fd < 0)
+ goto out;
+