Skip to content

Commit

Permalink
drivers flash_simulator: Set standard source macro appropriately
Browse files Browse the repository at this point in the history
This file uses several functions which are extensions to the the
std C library. Let's explicity select one of the extensions
which includes it instead of relaying on somebody having
set it for this file somewhere else.

(cherry picked from commit 318f824)

Original-Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
GitOrigin-RevId: 318f824
Change-Id: Ib99028c24ec84fba43c72638299cc7ec6bff14c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5242621
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
Tested-by: Tristan Honscheid <honscheid@google.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
  • Loading branch information
aescolar authored and Chromeos LUCI committed Feb 5, 2024
1 parent 0e9ea10 commit 0526982
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/flash/flash_simulator_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
* native simulator runner/host context, and not in Zephyr/embedded context.
*/

#undef _POSIX_C_SOURCE
/* Note: This is used only for interaction with the host C library, and is therefore exempt of
* coding guidelines rule A.4&5 which applies to the embedded code using embedded libraries
*/
#define _POSIX_C_SOURCE 200809L

#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
Expand Down

0 comments on commit 0526982

Please sign in to comment.