diff --git a/srcpkgs/elogind/patches/fix-glibc-statx.patch b/srcpkgs/elogind/patches/fix-glibc-statx.patch new file mode 100644 index 00000000000..5a0fb7da6dc --- /dev/null +++ b/srcpkgs/elogind/patches/fix-glibc-statx.patch @@ -0,0 +1,77 @@ +Fix glibc >= 2.28 statx + +diff --git a/meson.build b/meson.build +index 98a73a1..bd1b249 100644 +--- meson.build ++++ meson.build +@@ -534,8 +534,7 @@ decl_headers = ''' + #include + #include + #include +-//#include +-//#include ++#include + ''' + # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail + +@@ -549,9 +548,24 @@ foreach decl : ['char16_t', + + # We get -1 if the size cannot be determined + have = cc.sizeof(decl, prefix : decl_headers) > 0 ++ have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0 ++ ++ if decl == 'struct statx' ++ if have ++ want_linux_stat_h = false ++ else ++ have = cc.sizeof(decl, ++ prefix : decl_headers + '#include ', ++ args : '-D_GNU_SOURCE') > 0 ++ want_linux_stat_h = have ++ endif ++ endif ++ + conf.set10('HAVE_' + decl.underscorify().to_upper(), have) + endforeach + ++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h) ++ + foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'], + ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'], + ['IFLA_VRF_TABLE', 'linux/if_link.h'], +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 3708742..e909973 100644 +--- src/basic/missing.h ++++ src/basic/missing.h +@@ -34,7 +34,6 @@ + #include + #include + #include +-//#include + #include + #include + #include +@@ -44,6 +43,10 @@ + #include + #include + ++#if WANT_LINUX_STAT_H ++#include ++#endif ++ + /// Additional includes needed by elogind + #include "musl_missing.h" + +diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c +index dc4e802..29e3152 100644 +--- src/basic/xattr-util.c ++++ src/basic/xattr-util.c +@@ -20,7 +20,6 @@ + + #include + #include +-//#include + #include + #include + #include + diff --git a/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch b/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch new file mode 100644 index 00000000000..4249866c388 --- /dev/null +++ b/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch @@ -0,0 +1,29 @@ +debug is now a keyword taken by meson >= 0.48.0 and will error out if used as an option + +diff --git a/meson.build b/meson.build +index 7b0739f..98a73a1 100644 +--- meson.build ++++ meson.build +@@ -929,7 +929,7 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) + # substs.set('DEBUGTTY', get_option('debug-tty')) + #endif // 0 + +-debug = get_option('debug') ++debug = get_option('debug-extra') + enable_debug_hashmap = false + enable_debug_mmap_cache = false + #if 1 /// additional elogind debug mode +diff --git a/meson_options.txt b/meson_options.txt +index 84100b6..f13f904 100644 +--- meson_options.txt ++++ meson_options.txt +@@ -82,7 +82,7 @@ option('kexec-path', type : 'string', description : 'path to kexec') + # option('memory-accounting-default', type : 'boolean', + # description : 'enable MemoryAccounting= by default') + #else +-option('debug', type : 'string', ++option('debug-extra', type : 'string', + description : 'enable extra debugging (elogind,hashmap,mmap-cache)') + #endif // 0 + +