diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-04-16 13:07:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-04-16 13:07:24 +0100 |
commit | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (patch) | |
tree | 464c922e949c7e4d5d891fb2cdda5daee5612537 /dev-util/flatpak-builder/files | |
parent | e68d405c5d712af4387159df07e226217bdda049 (diff) |
gentoo resync : 16.04.2022
Diffstat (limited to 'dev-util/flatpak-builder/files')
-rw-r--r-- | dev-util/flatpak-builder/files/flatpak-builder-1.0.11-musl.patch | 18 | ||||
-rw-r--r-- | dev-util/flatpak-builder/files/flatpak-builder-1.2.2-musl.patch | 69 |
2 files changed, 87 insertions, 0 deletions
diff --git a/dev-util/flatpak-builder/files/flatpak-builder-1.0.11-musl.patch b/dev-util/flatpak-builder/files/flatpak-builder-1.0.11-musl.patch new file mode 100644 index 000000000000..b5ef0ec15504 --- /dev/null +++ b/dev-util/flatpak-builder/files/flatpak-builder-1.0.11-musl.patch @@ -0,0 +1,18 @@ +--- a/libglnx/glnx-macros.h ++++ b/libglnx/glnx-macros.h +@@ -28,6 +28,16 @@ + + G_BEGIN_DECLS + ++/* taken from glibc unistd.h and fixes musl */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + /* All of these are for C only. */ + #ifndef __GI_SCANNER__ diff --git a/dev-util/flatpak-builder/files/flatpak-builder-1.2.2-musl.patch b/dev-util/flatpak-builder/files/flatpak-builder-1.2.2-musl.patch new file mode 100644 index 000000000000..626fbddd0352 --- /dev/null +++ b/dev-util/flatpak-builder/files/flatpak-builder-1.2.2-musl.patch @@ -0,0 +1,69 @@ +diff --git a/subprojects/debugedit/tools/debugedit.c b/subprojects/debugedit/tools/debugedit.c +index 668777a..b3ba5cb 100644 +--- a/subprojects/debugedit/tools/debugedit.c ++++ b/subprojects/debugedit/tools/debugedit.c +@@ -25,7 +25,11 @@ + #include <byteswap.h> + #include <endian.h> + #include <errno.h> ++#ifdef __GLIBC__ + #include <error.h> ++#else ++#include "error.h" ++#endif + #include <limits.h> + #include <string.h> + #include <stdlib.h> +diff --git a/subprojects/debugedit/tools/error.h b/subprojects/debugedit/tools/error.h +new file mode 100644 +index 0000000..c330dc3 +--- /dev/null ++++ b/subprojects/debugedit/tools/error.h +@@ -0,0 +1,26 @@ ++#ifndef _ERROR_H ++#define _ERROR_H ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif +diff --git a/subprojects/libglnx/glnx-macros.h b/subprojects/libglnx/glnx-macros.h +index 6d8aca9..e3e4e33 100644 +--- a/subprojects/libglnx/glnx-macros.h ++++ b/subprojects/libglnx/glnx-macros.h +@@ -28,6 +28,16 @@ + + G_BEGIN_DECLS + ++/* taken from glibc unistd.h and fixes musl */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + /* All of these are for C only. */ + #ifndef __GI_SCANNER__ + |