Skip to contentSkip to conversation

include/android: Add g_key_file_get_double stub

PATCH In review Mark Yacoub 2 participants 2 messages May 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/android: Add g_key_file_get_double stub

Add a stub for g_key_file_get_double to include/android/glib.h to fix build failures in the Android environment where glib is not available.

---
 include/android/glib.h | 2 ++
 1 file changed, 2 insertions(+)
include/android/glib.h +2 -0
index 660386ca4..0b6658287 100644
@@ -51,6 +51,8 @@ static inline int g_key_file_get_integer(GKeyFile *key_file,
 	const char *group_name, const char *key, GError **error) { return 0; }
 static inline char *g_key_file_get_string(GKeyFile *key_file,
 	const char *group_name, const char *key, GError **error) { return NULL; }
+static inline double g_key_file_get_double(GKeyFile *key_file,
+	const char *group_name, const char *key, GError **error) { return 0.0; }
 static inline bool g_key_file_load_from_file(GKeyFile *key_file,
 	const char *file, int flags, GError **error) { return false; }
 
Signature · 1 line
2.54.0.746.g67dd491aae-goog
Reviewed-by on v1 1/1
#1 lore raw

Hi Mark,

Quoted 4 lines · Mark Yacoub

Add a stub for g_key_file_get_double to include/android/glib.h to fix build failures in the Android environment where glib is not available.

Please add Fixes: tag here, with this

Regards,
Kamil

Quoted 21 lines
---
 include/android/glib.h | 2 ++
 1 file changed, 2 insertions(+)
include/android/glib.h +2 -0
index 660386ca4..0b6658287 100644
@@ -51,6 +51,8 @@ static inline int g_key_file_get_integer(GKeyFile *key_file,
 	const char *group_name, const char *key, GError **error) { return 0; }
 static inline char *g_key_file_get_string(GKeyFile *key_file,
 	const char *group_name, const char *key, GError **error) { return NULL; }
+static inline double g_key_file_get_double(GKeyFile *key_file,
+	const char *group_name, const char *key, GError **error) { return 0.0; }
 static inline bool g_key_file_load_from_file(GKeyFile *key_file,
 	const char *file, int flags, GError **error) { return false; }
 
Signature · 1 line
2.54.0.746.g67dd491aae-goog