void-packages/srcpkgs/mariadb/patches/musl-ppc.patch
Randy McCaskill b79e121443 mariadb: update to 10.1.45.
Closes: #22348
2020-10-24 17:26:26 +02:00

26 lines
977 B
Diff

This header does not exist on musl, but there has been a
builtin for this in gcc for ages, so just use that instead.
--- storage/innobase/include/ut0ut.h
+++ storage/innobase/include/ut0ut.h
@@ -89,8 +89,7 @@ struct ut_when_dtor {
independent way by using YieldProcessor. */
# define UT_RELAX_CPU() YieldProcessor()
# elif defined(__powerpc__)
-#include <sys/platform/ppc.h>
-# define UT_RELAX_CPU() __ppc_get_timebase()
+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
# else
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
# endif
--- storage/xtradb/include/ut0ut.h
+++ storage/xtradb/include/ut0ut.h
@@ -86,6 +86,8 @@
# elif defined(__powerpc__) && defined __GLIBC__
#include <sys/platform/ppc.h>
# define UT_RELAX_CPU() __ppc_get_timebase()
+# elif defined(__powerpc__)
+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
# else
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
# endif