forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mate-extra/mate-power-manager: Fix build on musl
mate-power-manager was failing to build on musl due to missing execinfo.h, this header is not provided my musl, and egg_debug_backtrace fucntion call. The egg_debug_backtrace function just prints some trace to console. Closes: https://bugs.gentoo.org/762484 Signed-off-by: brahmajit das <[email protected]> Closes: gentoo#26198 Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
236125e
commit b9949b9
Showing
3 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
mate-extra/mate-power-manager/files/mate-power-manager-1.24.3-removing-backtrace.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,89 @@ | ||
# Instead of deleting the code blocks, just putting them inside a ifndef | ||
# condition is safer | ||
--- a/applets/brightness/egg-debug.c | ||
+++ b/applets/brightness/egg-debug.c | ||
@@ -74,6 +74,7 @@ pk_set_console_mode (guint console_code) | ||
printf ("%s", command); | ||
} | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/** | ||
* egg_debug_backtrace: | ||
**/ | ||
@@ -98,6 +99,7 @@ egg_debug_backtrace (void) | ||
free (symbols); | ||
} | ||
} | ||
+#endif | ||
|
||
/** | ||
* pk_log_line: | ||
@@ -229,8 +231,10 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha | ||
pk_print_line (func, file, line, buffer, CONSOLE_RED); | ||
g_free(buffer); | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/* we want to fix this! */ | ||
egg_debug_backtrace (); | ||
+#endif | ||
|
||
exit (1); | ||
} | ||
--- a/applets/inhibit/egg-debug.c | ||
+++ b/applets/inhibit/egg-debug.c | ||
@@ -74,6 +74,7 @@ pk_set_console_mode (guint console_code) | ||
printf ("%s", command); | ||
} | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/** | ||
* egg_debug_backtrace: | ||
**/ | ||
@@ -98,6 +99,7 @@ egg_debug_backtrace (void) | ||
free (symbols); | ||
} | ||
} | ||
+#endif | ||
|
||
/** | ||
* pk_log_line: | ||
@@ -229,8 +231,10 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha | ||
pk_print_line (func, file, line, buffer, CONSOLE_RED); | ||
g_free(buffer); | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/* we want to fix this! */ | ||
egg_debug_backtrace (); | ||
+#endif | ||
|
||
exit (1); | ||
} | ||
--- a/src/egg-debug.c | ||
+++ b/src/egg-debug.c | ||
@@ -74,6 +74,7 @@ pk_set_console_mode (guint console_code) | ||
printf ("%s", command); | ||
} | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/** | ||
* egg_debug_backtrace: | ||
**/ | ||
@@ -98,6 +99,7 @@ egg_debug_backtrace (void) | ||
free (symbols); | ||
} | ||
} | ||
+#endif | ||
|
||
/** | ||
* pk_log_line: | ||
@@ -229,8 +231,10 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha | ||
pk_print_line (func, file, line, buffer, CONSOLE_RED); | ||
g_free(buffer); | ||
|
||
+#if (defined(__UCLIBC__) || defined(__GLIBC__)) | ||
/* we want to fix this! */ | ||
egg_debug_backtrace (); | ||
+#endif | ||
|
||
exit (1); | ||
} |
38 changes: 38 additions & 0 deletions
38
mate-extra/mate-power-manager/files/mate-power-manager-1.24.3-removing-execinfo.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,38 @@ | ||
# Musl doesn't supply execinfo.h as a result build fails. | ||
# Closes: https://bugs.gentoo.org/762484 | ||
--- a/applets/brightness/egg-debug.c | ||
+++ b/applets/brightness/egg-debug.c | ||
@@ -39,7 +39,9 @@ | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
#include <time.h> | ||
+#if (defined(__GLIBC__)) | ||
#include <execinfo.h> | ||
+#endif | ||
|
||
#include "egg-debug.h" | ||
|
||
--- a/applets/inhibit/egg-debug.c | ||
+++ b/applets/inhibit/egg-debug.c | ||
@@ -39,7 +39,9 @@ | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
#include <time.h> | ||
+#if (defined(__GLIBC__)) | ||
#include <execinfo.h> | ||
+#endif | ||
|
||
#include "egg-debug.h" | ||
|
||
--- a/src/egg-debug.c | ||
+++ b/src/egg-debug.c | ||
@@ -39,7 +39,9 @@ | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
#include <time.h> | ||
+#if (defined(__GLIBC__)) | ||
#include <execinfo.h> | ||
+#endif | ||
|
||
#include "egg-debug.h" | ||
|
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