mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From 2d1c948beb9411128674a76cc5d8054476da1c7c Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Sun, 30 Jan 2022 10:36:17 +0100
|
|
Subject: [PATCH 04/12] wpa_supplicant: replace obsolete c functions
|
|
|
|
---
|
|
components/wpa_supplicant/port/include/os.h | 2 +-
|
|
components/wpa_supplicant/port/os_xtensa.c | 3 ++-
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/components/wpa_supplicant/port/include/os.h b/components/wpa_supplicant/port/include/os.h
|
|
index 74e1e349e9..823eb0d35d 100644
|
|
--- a/components/wpa_supplicant/port/include/os.h
|
|
+++ b/components/wpa_supplicant/port/include/os.h
|
|
@@ -221,7 +221,7 @@ char * os_readfile(const char *name, size_t *len);
|
|
#endif
|
|
|
|
#ifndef os_bzero
|
|
-#define os_bzero(s, n) bzero(s, n)
|
|
+#define os_bzero(s, n) memset(s, 0, n)
|
|
#endif
|
|
|
|
|
|
diff --git a/components/wpa_supplicant/port/os_xtensa.c b/components/wpa_supplicant/port/os_xtensa.c
|
|
index 53ed080ca8..cf92aeb5e4 100644
|
|
--- a/components/wpa_supplicant/port/os_xtensa.c
|
|
+++ b/components/wpa_supplicant/port/os_xtensa.c
|
|
@@ -57,7 +57,8 @@ void os_sleep(os_time_t sec, os_time_t usec)
|
|
sleep(sec);
|
|
}
|
|
if (usec) {
|
|
- usleep(usec);
|
|
+ struct timespec delay = { 0, usec * 1000 };
|
|
+ nanosleep(&delay, NULL);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.17.1
|
|
|