--- a/src/arlib.h 2015-08-21 14:22:37.000000000 +0200 +++ b/src/arlib.h 2015-11-20 08:02:55.153199611 +0100 @@ -29,6 +29,16 @@ #include #include +#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; --- elfutils-0.179/src/elfcompress.c 2020-03-30 07:17:45.000000000 -0500 +++ elfutils-0.179/src/elfcompress.c 2020-04-17 04:03:53.719403182 -0500 @@ -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; @@ -134,8 +142,10 @@ parse_opt (int key, char *arg __attribut case ARGP_KEY_SUCCESS: if (type == T_UNSET) type = T_COMPRESS_ZLIB; - if (patterns == NULL) - add_pattern (".?(z)debug*"); + if (patterns == NULL) { + add_pattern (".debug*"); + add_pattern (".zdebug*"); + } break; case ARGP_KEY_NO_ARGS: @@ -1312,7 +1322,7 @@ main (int argc, char **argv) N_("What type of compression to apply. TYPE can be 'none' (decompress), 'zlib' (ELF ZLIB compression, the default, 'zlib-gabi' is an alias) or 'zlib-gnu' (.zdebug GNU style compression, 'gnu' is an alias)"), 0 }, { "name", 'n', "SECTION", 0, - N_("SECTION name to (de)compress, SECTION is an extended wildcard pattern (defaults to '.?(z)debug*')"), + N_("SECTION name to (de)compress, SECTION is an wildcard pattern (defaults to '.debug*' and '.zdebug*')"), 0 }, { "verbose", 'v', NULL, 0, N_("Print a message for each section being (de)compressed"), --- elfutils-0.179/src/strip.c 2020-03-30 07:17:45.000000000 -0500 +++ elfutils-0.179/src/strip.c 2020-04-17 04:03:53.719403182 -0500 @@ -46,6 +46,14 @@ #include #include +#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. */ --- elfutils-0.176/tests/elfstrmerge.c 2019-02-15 15:46:47.000000000 +0000 +++ elfutils-0.176/tests/elfstrmerge.c 2019-07-18 06:29:58.109875347 +0000 @@ -33,6 +33,10 @@ #include ELFUTILS_HEADER(dwelf) #include "elf-knowledge.h" +#if !defined(ALLPERMS) +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ +#endif + /* The original ELF file. */ static int fd = -1; static Elf *elf = NULL;