78 lines
2.6 KiB
Diff
78 lines
2.6 KiB
Diff
From 54107a5d81ffaba6111fea2c98618109b6ddcde4 Mon Sep 17 00:00:00 2001
|
|
From: licihua <licihua@huawei.com>
|
|
Date: Thu, 29 Dec 2022 11:30:17 +0800
|
|
Subject: [PATCH 2/3] libvisual-0.4.0-inlinedefineconflict
|
|
|
|
---
|
|
libvisual/lv_cache.c | 4 ++--
|
|
libvisual/lv_defines.h | 2 ++
|
|
libvisual/lv_time.h | 4 ++--
|
|
3 files changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libvisual/lv_cache.c b/libvisual/lv_cache.c
|
|
index f905d22..3f975aa 100644
|
|
--- a/libvisual/lv_cache.c
|
|
+++ b/libvisual/lv_cache.c
|
|
@@ -32,7 +32,7 @@
|
|
static int cache_dtor (VisObject *object);
|
|
static int cache_remove_list_entry (VisCache *cache, VisListEntry **le);
|
|
|
|
-static inline void handle_request_reset (VisCache *cache, VisListEntry *le);
|
|
+static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le);
|
|
|
|
static int cache_dtor (VisObject *object)
|
|
{
|
|
@@ -74,7 +74,7 @@ static int cache_remove_list_entry (VisCache *cache, VisListEntry **le)
|
|
}
|
|
|
|
|
|
-static inline void handle_request_reset (VisCache *cache, VisListEntry *le)
|
|
+static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le)
|
|
{
|
|
VisCacheEntry *centry;
|
|
|
|
diff --git a/libvisual/lv_defines.h b/libvisual/lv_defines.h
|
|
index 0de91b6..2961d39 100644
|
|
--- a/libvisual/lv_defines.h
|
|
+++ b/libvisual/lv_defines.h
|
|
@@ -63,12 +63,14 @@
|
|
|
|
/* Compiler specific optimalization macros */
|
|
#if __GNUC__ >= 3
|
|
+# define lv_inline inline __attribute__ ((always_inline))
|
|
# define __malloc __attribute__ ((malloc))
|
|
# define __packed __attribute__ ((packed))
|
|
# define VIS_LIKELY(x) __builtin_expect (!!(x), 1)
|
|
# define VIS_UNLIKELY(x) __builtin_expect (!!(x), 0)
|
|
#else
|
|
# define inline /* no inline */
|
|
+# define lv_inline /* no lv_inline */
|
|
# define __malloc /* no malloc */
|
|
# define __packed /* no packed */
|
|
# define VIS_LIKELY(x) (x)
|
|
diff --git a/libvisual/lv_time.h b/libvisual/lv_time.h
|
|
index 885448a..665af4a 100644
|
|
--- a/libvisual/lv_time.h
|
|
+++ b/libvisual/lv_time.h
|
|
@@ -101,7 +101,7 @@ int visual_timer_has_passed_by_values (VisTimer *timer, long sec, long usec);
|
|
*
|
|
* @return Nothing.
|
|
*/
|
|
-static inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
|
|
+static lv_inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
|
|
{
|
|
#if defined(VISUAL_ARCH_X86) || defined(VISUAL_ARCH_X86_64)
|
|
__asm __volatile
|
|
@@ -115,7 +115,7 @@ static inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
|
|
}
|
|
|
|
/* FIXME use uint64_t here, make sure type exists */
|
|
-static inline unsigned long long visual_timer_tsc_get_returned ()
|
|
+static lv_inline unsigned long long visual_timer_tsc_get_returned ()
|
|
{
|
|
uint32_t lo, hi;
|
|
|
|
--
|
|
2.26.2
|
|
|