feat(linux): added fls() on Linux

This commit is contained in:
Jakob Hasse
2024-01-24 12:13:32 +08:00
parent bca642f330
commit 48d121653b
11 changed files with 137 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This is a helper include for fls(), which is present in the ESP-IDF toolchains and MacOS, but not on Linux.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
int fls(unsigned int value);
#ifdef __cplusplus
}
#endif
#include_next <strings.h>