-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libmount,libsystemd] Updates, fixes (#37869)
- Loading branch information
Showing
11 changed files
with
149 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/include/strutils.h b/include/strutils.h | ||
index e9f8a0c..2f6d285 100644 | ||
--- a/include/strutils.h | ||
+++ b/include/strutils.h | ||
@@ -16,6 +16,10 @@ | ||
|
||
#include "c.h" | ||
|
||
+// private, and clashing with libsystemd. | ||
+#define parse_size ul__parse_size | ||
+#define parse_range ul__parse_range | ||
+ | ||
/* initialize a custom exit code for all *_or_err functions */ | ||
extern void strutils_set_exitcode(int exit_code); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/basic/memory-util.h b/src/basic/memory-util.h | ||
index 1179513..fc39e06 100644 | ||
--- a/src/basic/memory-util.h | ||
+++ b/src/basic/memory-util.h | ||
@@ -41,7 +41,9 @@ static inline int memcmp_safe(const void *s1, const void *s2, size_t n) { | ||
return 0; | ||
assert(s1); | ||
assert(s2); | ||
+DISABLE_WARNING_NONNULL | ||
return memcmp(s1, s2, n); | ||
+REENABLE_WARNING | ||
} | ||
|
||
/* Compare s1 (length n1) with s2 (length n2) in lexicographic order. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff --git a/meson.build b/meson.build | ||
index 7419e2b..687450e 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -1909,12 +1909,11 @@ libsystemd_includes = [basic_includes, include_directories( | ||
includes = [libsystemd_includes, include_directories('src/shared')] | ||
|
||
subdir('po') | ||
-subdir('catalog') | ||
+support_url='' | ||
subdir('src/fundamental') | ||
subdir('src/basic') | ||
subdir('src/libsystemd') | ||
-subdir('src/shared') | ||
-subdir('src/libudev') | ||
+subdir('src/systemd') # headers | ||
|
||
libsystemd = shared_library( | ||
'systemd', | ||
@@ -1930,7 +1929,8 @@ libsystemd = shared_library( | ||
threads, | ||
userspace], | ||
link_depends : libsystemd_sym, | ||
- install : true, | ||
+ build_by_default : static_libsystemd == 'false', | ||
+ install : static_libsystemd == 'false', | ||
install_tag: 'libsystemd', | ||
install_dir : libdir) | ||
|
||
@@ -1963,6 +1963,8 @@ install_libsystemd_static = static_library( | ||
userspace], | ||
c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC'])) | ||
|
||
+if false | ||
+ | ||
libudev = shared_library( | ||
'udev', | ||
version : libudev_version, | ||
@@ -1974,7 +1976,8 @@ libudev = shared_library( | ||
dependencies : [threads, | ||
userspace], | ||
link_depends : libudev_sym, | ||
- install : true, | ||
+ build_by_default : static_libudev == 'false', | ||
+ install : static_libudev == 'false', | ||
install_tag: 'libudev', | ||
install_dir : libdir) | ||
|
||
@@ -2661,6 +2664,13 @@ if not meson.is_cross_build() | ||
command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs]) | ||
endif | ||
|
||
+endif # false | ||
+static_libudev='unused' | ||
+bashcompletiondir='no' | ||
+zshcompletiondir='no' | ||
+want_html=false | ||
+want_man=false | ||
+ | ||
############################################################ | ||
|
||
alt_time_epoch = run_command('date', '-Is', '-u', '-d', '@@0@'.format(time_epoch), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
diff --git a/meson.build b/meson.build | ||
index 687450e..ee4460b 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -1011,6 +1011,9 @@ threads = dependency('threads') | ||
librt = cc.find_library('rt') | ||
libm = cc.find_library('m') | ||
libdl = cc.find_library('dl') | ||
+conf.set_quoted('PC_RT', librt.found() ? '-lrt' : '') | ||
+conf.set_quoted('PC_M', libm.found() ? '-lm' : '') | ||
+conf.set_quoted('PC_DL', libdl.found() ? '-ldl' : '') | ||
libcrypt = dependency('libcrypt', 'libxcrypt', required : false) | ||
if not libcrypt.found() | ||
# fallback to use find_library() if libcrypt is provided by glibc, e.g. for LibreELEC. | ||
diff --git a/src/libsystemd/libsystemd.pc.in b/src/libsystemd/libsystemd.pc.in | ||
index da6e4e667e..3786238ccb 100644 | ||
index 3a43ef6..930f16a 100644 | ||
--- a/src/libsystemd/libsystemd.pc.in | ||
+++ b/src/libsystemd/libsystemd.pc.in | ||
@@ -17,4 +17,6 @@ Description: systemd Library | ||
URL: {{PROJECT_URL}} | ||
Version: {{PROJECT_VERSION}} | ||
Libs: -L${libdir} -lsystemd | ||
+Libs.private: -lrt | ||
+Libs.private: {{PC_DL}} {{PC_M}} {{PC_RT}} | ||
+Requires.private: libcap libcrypt liblz4 liblzma libzstd mount | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters