-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
pkg/flashdb/patches/0002-port-fal-add-option-to-use-native-assert.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
From 4daeb0a609e6b5bfea608900576109e8d4fa604c Mon Sep 17 00:00:00 2001 | ||
From: Benjamin Valentin <benjamin.valentin@ml-pa.com> | ||
Date: Mon, 7 Aug 2023 17:23:48 +0200 | ||
Subject: [PATCH] [port/fal] add option to use native assert() | ||
|
||
--- | ||
port/fal/inc/fal_def.h | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git a/port/fal/inc/fal_def.h b/port/fal/inc/fal_def.h | ||
index f558598..de8aada 100644 | ||
--- a/port/fal/inc/fal_def.h | ||
+++ b/port/fal/inc/fal_def.h | ||
@@ -13,6 +13,9 @@ | ||
|
||
#include <stdint.h> | ||
#include <stdio.h> | ||
+#ifdef FDB_USING_NATIVE_ASSERT | ||
+#include <assert.h> | ||
+#endif | ||
|
||
#define FAL_SW_VERSION "0.5.99" | ||
|
||
@@ -50,6 +53,7 @@ | ||
#endif | ||
|
||
#if FAL_DEBUG | ||
+#ifndef FDB_USING_NATIVE_ASSERT | ||
#ifdef assert | ||
#undef assert | ||
#endif | ||
@@ -59,6 +63,7 @@ if (!(EXPR)) \ | ||
FAL_PRINTF("(%s) has assert failed at %s.\n", #EXPR, __func__ ); \ | ||
while (1); \ | ||
} | ||
+#endif | ||
|
||
/* debug level log */ | ||
#ifdef log_d | ||
@@ -69,10 +74,12 @@ if (!(EXPR)) \ | ||
|
||
#else | ||
|
||
+#ifndef FDB_USING_NATIVE_ASSERT | ||
#ifdef assert | ||
#undef assert | ||
#endif | ||
#define assert(EXPR) ((void)0); | ||
+#endif | ||
|
||
/* debug level log */ | ||
#ifdef log_d | ||
-- | ||
2.39.2 | ||
|
This file was deleted.
Oops, something went wrong.