diff mbox series

mt76: Fix compile against glibc

Message ID 20201217131646.1058-1-hauke@hauke-m.de
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series mt76: Fix compile against glibc | expand

Commit Message

Hauke Mehrtens Dec. 17, 2020, 1:16 p.m. UTC
The mt76 test tools did not compile against glibc.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 ...et-mode-for-new-file-tmp-mt76-test-s.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch
diff mbox series

Patch

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 000000000000..71b43a1cb6d6
--- /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;
+