From 73b9883c6f30320b727a664ff2c84cc772aac94b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 2 May 2021 14:09:05 +0200 Subject: [PATCH] build: don't link libnm/libnm-core against libuuid We use util-linux's libuuid for handling UUIDs. But UUIDs are really a trivial thing, at least the portion that we use. Reimplement the parse/unparse/generate_random() methods and drop the dependency. Note that no other libraries from our dependency chain was dragging in libuuid, so thereby we really get rid of the dependency. We still require libuuid for building, because it is used by an example program. Maybe that should be changed, to avoid the build dependency. But that can be done at a later time. --- Makefile.am | 2 -- src/libnm-core-impl/nm-utils.c | 1 - 2 files changed, 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3eb66ecdb2..1f74709ffc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1394,7 +1394,6 @@ nodist_src_libnm_core_impl_libnm_core_impl_la_SOURCES = \ src_libnm_core_impl_libnm_core_impl_la_LIBADD = \ $(GLIB_LIBS) \ - $(UUID_LIBS) \ $(NULL) src_libnm_core_impl_libnm_core_impl_la_LDFLAGS = \ @@ -1762,7 +1761,6 @@ src_libnm_client_impl_libnm_client_impl_la_LIBADD = \ src/c-siphash/libc-siphash.la \ $(GLIB_LIBS) \ $(DL_LIBS) \ - $(UUID_LIBS) \ $(LIBUDEV_LIBS) \ $(NULL) diff --git a/src/libnm-core-impl/nm-utils.c b/src/libnm-core-impl/nm-utils.c index edbee57dee..932206f3bc 100644 --- a/src/libnm-core-impl/nm-utils.c +++ b/src/libnm-core-impl/nm-utils.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include