stagex/packages/elfutils/musl-macros.patch
2024-02-13 08:16:03 -08:00

78 lines
2.6 KiB
Diff

diff -ur elfutils-0.187.orig/lib/libeu.h elfutils-0.187/lib/libeu.h
--- elfutils-0.187.orig/lib/libeu.h 2022-06-16 18:48:12.916472948 +0200
+++ elfutils-0.187/lib/libeu.h 2022-06-16 18:48:54.219839323 +0200
@@ -31,6 +31,18 @@
#include <stddef.h>
#include <stdint.h>
+#include <unistd.h>
+#include <alloca.h>
+#include <string.h>
+
+#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
extern void *xmalloc (size_t) __attribute__ ((__malloc__));
extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
diff -ur elfutils-0.187.orig/src/arlib.h elfutils-0.187/src/arlib.h
--- elfutils-0.187.orig/src/arlib.h 2022-06-16 18:48:12.919806284 +0200
+++ elfutils-0.187/src/arlib.h 2022-06-16 18:48:18.879811052 +0200
@@ -29,6 +29,16 @@
#include <stdint.h>
#include <sys/types.h>
+#if !defined(ACCESSPERMS)
+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
+#endif
+#if !defined(ALLPERMS)
+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
+#endif
+#if !defined(DEFFILEMODE)
+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
+#endif
+
/* State of -D/-U flags. */
extern bool arlib_deterministic_output;
diff -ur elfutils-0.187.orig/src/elfcompress.c elfutils-0.187/src/elfcompress.c
--- elfutils-0.187.orig/src/elfcompress.c 2022-06-16 18:48:12.919806284 +0200
+++ elfutils-0.187/src/elfcompress.c 2022-06-16 18:48:18.879811052 +0200
@@ -37,6 +37,14 @@
#include "libeu.h"
#include "printversion.h"
+#if !defined(FNM_EXTMATCH)
+# define FNM_EXTMATCH 0
+#endif
+
+#if !defined(ALLPERMS)
+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
+#endif
+
/* Name and version of program. */
ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
diff -ur elfutils-0.187.orig/src/strip.c elfutils-0.187/src/strip.c
--- elfutils-0.187.orig/src/strip.c 2022-06-16 18:48:12.919806284 +0200
+++ elfutils-0.187/src/strip.c 2022-06-16 18:48:18.879811052 +0200
@@ -46,6 +46,14 @@
#include <system.h>
#include <printversion.h>
+#if !defined(FNM_EXTMATCH)
+# define FNM_EXTMATCH 0
+#endif
+
+#if !defined(ACCESSPERMS)
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
+#endif
+
typedef uint8_t GElf_Byte;
/* Name and version of program. */