summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/Makefile37
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-netlink.h2
-rw-r--r--src/libsystemd/include/systemd/sd-utf8.h32
-rw-r--r--src/libsystemd/sd_event_get_fd.xml2
-rw-r--r--src/libsystemd/src/Makefile41
-rw-r--r--src/libsystemd/src/sd-bus/Makefile4
-rw-r--r--src/libsystemd/src/sd-bus/bus-signature.h1
-rw-r--r--src/libsystemd/src/sd-bus/bus-socket.h2
-rw-r--r--src/libsystemd/src/sd-bus/bus-track.h2
-rw-r--r--src/libsystemd/src/sd-device/device-internal.h1
-rw-r--r--src/libsystemd/src/sd-hwdb/Makefile6
-rw-r--r--src/libsystemd/src/sd-journal/Makefile15
-rw-r--r--src/libsystemd/src/sd-journal/mmap-cache.h2
-rw-r--r--src/libsystemd/src/sd-netlink/local-addresses.c1
-rw-r--r--src/libsystemd/src/sd-network/network-util.h2
-rw-r--r--src/libsystemd/src/sd-utf8/sd-utf8.c35
-rw-r--r--src/libsystemd/src/subdir.mk8
-rw-r--r--src/libsystemd/src/test.mk5
18 files changed, 86 insertions, 112 deletions
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index be66c9c898..e85ef4a778 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -39,14 +39,14 @@ libsystemd_la_LDFLAGS = \
-Wl,--version-script=$(srcdir)/libsystemd.sym
libsystemd_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-basic.la \
- libsystemd-journal-internal.la
+ libsystemd-internal.la
+
+libsystemd_la_LIBADD = $(libsystemd-internal.DEPENDS)
pkgconfiglib_DATA += \
src/libsystemd/libsystemd.pc
-pkginclude_HEADERS += \
+_pkginclude_HEADERS += \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
@@ -82,28 +82,33 @@ tests += \
test-local-addresses \
test-resolve
-pkginclude_HEADERS += \
+_pkginclude_HEADERS += \
src/systemd/sd-journal.h \
src/systemd/sd-messages.h \
src/systemd/_sd-common.h
-test-libsystemd-sym.c: \
- $(top_builddir)/src/libsystemd/libsystemd.sym \
- src/systemd/sd-journal.h \
- src/systemd/sd-daemon.h \
- src/systemd/sd-login.h \
- src/systemd/sd-bus.h \
- src/systemd/sd-utf8.h \
- src/systemd/sd-resolve.h \
- src/systemd/sd-path.h \
- src/systemd/sd-event.h
- $(generate-sym-test)
+$(outdir)/test-libsystemd-sym.c: \
+ $(srcdir)/include/systemd/sd-journal.h \
+ $(srcdir)/include/systemd/sd-daemon.h \
+ $(srcdir)/include/systemd/sd-login.h \
+ $(srcdir)/include/systemd/sd-bus.h \
+ $(srcdir)/include/systemd/sd-utf8.h \
+ $(srcdir)/include/systemd/sd-resolve.h \
+ $(srcdir)/include/systemd/sd-path.h \
+ $(srcdir)/include/systemd/sd-event.h
nodist_test_libsystemd_sym_SOURCES = \
test-libsystemd-sym.c
test_libsystemd_sym_LDADD = \
libsystemd.la
+$(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL_HEADERS)
+
+files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS)))
+$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym
+
nested.subdirs += src
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/include-staging/systemd-staging/sd-netlink.h b/src/libsystemd/include-staging/systemd-staging/sd-netlink.h
index 8a8c85a004..7db35e1756 100644
--- a/src/libsystemd/include-staging/systemd-staging/sd-netlink.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-netlink.h
@@ -24,8 +24,8 @@
#include <netinet/ether.h>
#include <netinet/in.h>
-#include <linux/rtnetlink.h>
#include <linux/neighbour.h>
+#include <linux/rtnetlink.h>
#include <systemd/_sd-common.h>
#include <systemd/sd-event.h>
diff --git a/src/libsystemd/include/systemd/sd-utf8.h b/src/libsystemd/include/systemd/sd-utf8.h
deleted file mode 100644
index 6781983878..0000000000
--- a/src/libsystemd/include/systemd/sd-utf8.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef foosdutf8hfoo
-#define foosdutf8hfoo
-
-/***
- This file is part of systemd.
-
- Copyright 2013 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include "_sd-common.h"
-
-_SD_BEGIN_DECLARATIONS;
-
-_sd_pure_ const char *sd_utf8_is_valid(const char *s);
-_sd_pure_ const char *sd_ascii_is_valid(const char *s);
-
-_SD_END_DECLARATIONS;
-
-#endif
diff --git a/src/libsystemd/sd_event_get_fd.xml b/src/libsystemd/sd_event_get_fd.xml
index f68752dd0e..982f279657 100644
--- a/src/libsystemd/sd_event_get_fd.xml
+++ b/src/libsystemd/sd_event_get_fd.xml
@@ -119,7 +119,7 @@
<example>
<title>Integration in the GLib event loop</title>
- <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting>
+ <programlisting><xi:include href="sd_event_get_fd-glib-example.c" parse="text" /></programlisting>
</example>
</refsect1>
diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile
index a7c1b4789a..5907b378a4 100644
--- a/src/libsystemd/src/Makefile
+++ b/src/libsystemd/src/Makefile
@@ -23,18 +23,16 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-libsystemd_internal_la_SOURCES = \
+_libsystemd_internal_la_SOURCES = \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
- src/systemd/sd-utf8.h \
src/systemd/sd-event.h \
src/systemd/sd-netlink.h \
src/systemd/sd-resolve.h \
src/systemd/sd-login.h \
src/systemd/sd-id128.h \
src/systemd/sd-daemon.h \
- src/systemd/sd-path.h \
src/systemd/sd-network.h \
src/systemd/sd-hwdb.h \
src/systemd/sd-device.h \
@@ -81,7 +79,8 @@ libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-bus/kdbus.h \
src/libsystemd/sd-bus/bus-dump.c \
src/libsystemd/sd-bus/bus-dump.h \
- src/libsystemd/sd-utf8/sd-utf8.c \
+ src/libsystemd/sd-bus/bus-util.c \
+ src/libsystemd/sd-bus/bus-util.h \
src/libsystemd/sd-event/sd-event.c \
src/libsystemd/sd-netlink/sd-netlink.c \
src/libsystemd/sd-netlink/netlink-internal.h \
@@ -99,7 +98,6 @@ libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-id128/id128-util.c \
src/libsystemd/sd-daemon/sd-daemon.c \
src/libsystemd/sd-login/sd-login.c \
- src/libsystemd/sd-path/sd-path.c \
src/libsystemd/sd-network/sd-network.c \
src/libsystemd/sd-network/network-util.h \
src/libsystemd/sd-network/network-util.c \
@@ -118,10 +116,10 @@ libsystemd_internal_la_SOURCES = \
libsystemd_internal_la_LIBADD = \
-lresolv
-noinst_LTLIBRARIES += \
+rootlibexec_LTLIBRARIES += \
libsystemd-internal.la
-libsystemd_journal_internal_la_SOURCES = \
+_libsystemd_journal_internal_la_SOURCES = \
src/journal/sd-journal.c \
src/systemd/sd-journal.h \
src/systemd/_sd-common.h \
@@ -142,11 +140,9 @@ libsystemd_journal_internal_la_SOURCES = \
src/journal/mmap-cache.h \
src/journal/compress.c \
src/journal/audit-type.h \
- src/journal/audit-type.c \
- src/shared/gcrypt-util.h \
- src/shared/gcrypt-util.c
+ src/journal/audit-type.c
-nodist_libsystemd_journal_internal_la_SOURCES = \
+#nodist_libsystemd_journal_internal_la_SOURCES = \
src/journal/audit_type-to-name.h
gperf_txt_sources += \
@@ -174,7 +170,7 @@ libsystemd_journal_internal_la_LIBADD += \
endif # HAVE_LZ4
ifneq ($(HAVE_GCRYPT),)
-libsystemd_journal_internal_la_SOURCES += \
+_libsystemd_journal_internal_la_SOURCES += \
src/journal/journal-authenticate.c \
src/journal/journal-authenticate.h \
src/journal/fsprg.c \
@@ -183,11 +179,30 @@ libsystemd_journal_internal_la_SOURCES += \
libsystemd_journal_internal_la_LIBADD += \
$(GCRYPT_LIBS)
+libsystemd_journal_internal_la_CFLAGS += \
+ $(GCRYPT_CFLAGS)
endif # HAVE_GCRYPT
-noinst_LTLIBRARIES += \
+#noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
+# Hook into the `am` module
+libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS)
+libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD)
+
+# Don't bother trying to hook into the `am` module for the sources; the only
+# thing it adds over declaring the dependencies is adding the appropriate
+# directories to am.subdirs=>at.subdirs; but we can do that here just as easily
+# with nested.subdirs.
+sd.libsystemd_SOURCES =
+sd.libsystemd_SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES)))
+sd.libsystemd_SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES))))
+$(outdir)/libsystemd-internal.la: $(addprefix $(outdir)/,$(sd.libsystemd_SOURCES:.c=.lo))
+
+libsystemd_internal_la_LIBADD += \
+ libsystemd-basic.la \
+ libsystemd-gcrypt.la
+
nested.subdirs += sd-bus
nested.subdirs += sd-daemon
nested.subdirs += sd-device
diff --git a/src/libsystemd/src/sd-bus/Makefile b/src/libsystemd/src/sd-bus/Makefile
index 60150788d8..a483e31fd1 100644
--- a/src/libsystemd/src/sd-bus/Makefile
+++ b/src/libsystemd/src/sd-bus/Makefile
@@ -20,7 +20,11 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+sd.CPPFLAGS += $(libsystemd.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-basic.CPPFLAGS)
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-bus/bus-signature.h b/src/libsystemd/src/sd-bus/bus-signature.h
index 1e0cd7f587..8b7a45cef5 100644
--- a/src/libsystemd/src/sd-bus/bus-signature.h
+++ b/src/libsystemd/src/sd-bus/bus-signature.h
@@ -20,6 +20,7 @@
***/
#include <stdbool.h>
+#include <sys/types.h>
bool signature_is_single(const char *s, bool allow_dict_entry);
bool signature_is_pair(const char *s);
diff --git a/src/libsystemd/src/sd-bus/bus-socket.h b/src/libsystemd/src/sd-bus/bus-socket.h
index 6e1d32e6a7..712e37bcc0 100644
--- a/src/libsystemd/src/sd-bus/bus-socket.h
+++ b/src/libsystemd/src/sd-bus/bus-socket.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
+
#include <systemd/sd-bus.h>
void bus_socket_setup(sd_bus *b);
diff --git a/src/libsystemd/src/sd-bus/bus-track.h b/src/libsystemd/src/sd-bus/bus-track.h
index 26bd05f5c7..68398281ae 100644
--- a/src/libsystemd/src/sd-bus/bus-track.h
+++ b/src/libsystemd/src/sd-bus/bus-track.h
@@ -19,5 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <systemd/sd-bus.h>
+
void bus_track_dispatch(sd_bus_track *track);
void bus_track_close(sd_bus_track *track);
diff --git a/src/libsystemd/src/sd-device/device-internal.h b/src/libsystemd/src/sd-device/device-internal.h
index c2539feb89..c23e329ed4 100644
--- a/src/libsystemd/src/sd-device/device-internal.h
+++ b/src/libsystemd/src/sd-device/device-internal.h
@@ -22,6 +22,7 @@
#include "systemd-basic/hashmap.h"
#include "systemd-basic/set.h"
+#include "systemd-staging/sd-device.h"
struct sd_device {
uint64_t n_ref;
diff --git a/src/libsystemd/src/sd-hwdb/Makefile b/src/libsystemd/src/sd-hwdb/Makefile
index 60150788d8..a2696e2976 100644
--- a/src/libsystemd/src/sd-hwdb/Makefile
+++ b/src/libsystemd/src/sd-hwdb/Makefile
@@ -20,7 +20,13 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+sd.CPPFLAGS += $(libsystemd.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-staging.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-basic.CPPFLAGS)
+sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile
index d0415fb0d3..10cd8c45bb 100644
--- a/src/libsystemd/src/sd-journal/Makefile
+++ b/src/libsystemd/src/sd-journal/Makefile
@@ -23,20 +23,25 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-audit_list_includes = -include linux/audit.h -include missing.h
+audit_list_includes = -include linux/audit.h -include systemd-basic/missing.h
ifneq ($(HAVE_AUDIT),)
audit_list_includes += -include libaudit.h
endif # HAVE_AUDIT
-$(outdir)/audit_type-list.txt:
+$(outdir)/audit_type-list.txt: | $(outdir)/$(DEPDIR)
$(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
$(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
# fsprg.c is a drop-in file using void pointer arithmetic
-libsystemd_journal_internal_la_CFLAGS += \
- $(GCRYPT_CFLAGS) \
- -Wno-pointer-arith
+$(outdir)/fsprg.lo: sd.ALL_CFLAGS += -Wno-pointer-arith
+
+$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h
+
+sd.CPPFLAGS += $(libsystemd.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-basic.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-gcrypt.CPPFLAGS)
+sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\"
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-journal/mmap-cache.h b/src/libsystemd/src/sd-journal/mmap-cache.h
index 199d944647..d7eca3c237 100644
--- a/src/libsystemd/src/sd-journal/mmap-cache.h
+++ b/src/libsystemd/src/sd-journal/mmap-cache.h
@@ -20,7 +20,9 @@
***/
#include <stdbool.h>
+#include <stdint.h>
#include <sys/stat.h>
+#include <sys/types.h>
/* One context per object type, plus one of the header, plus one "additional" one */
#define MMAP_CACHE_MAX_CONTEXTS 9
diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c
index 74e1b2c2bf..6d6ee9c504 100644
--- a/src/libsystemd/src/sd-netlink/local-addresses.c
+++ b/src/libsystemd/src/sd-netlink/local-addresses.c
@@ -23,7 +23,6 @@
#include "systemd-staging/sd-netlink.h"
#include "local-addresses.h"
-#include "netlink-util.h"
static int address_compare(const void *_a, const void *_b) {
const struct local_address *a = _a, *b = _b;
diff --git a/src/libsystemd/src/sd-network/network-util.h b/src/libsystemd/src/sd-network/network-util.h
index 4527ed7c0f..253a6b9934 100644
--- a/src/libsystemd/src/sd-network/network-util.h
+++ b/src/libsystemd/src/sd-network/network-util.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
+
#include "systemd-staging/sd-network.h"
bool network_is_online(void);
diff --git a/src/libsystemd/src/sd-utf8/sd-utf8.c b/src/libsystemd/src/sd-utf8/sd-utf8.c
deleted file mode 100644
index e00ec94390..0000000000
--- a/src/libsystemd/src/sd-utf8/sd-utf8.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/***
- This file is part of systemd.
-
- Copyright 2013 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <systemd/sd-utf8.h>
-
-#include "systemd-basic/utf8.h"
-#include "systemd-basic/util.h"
-
-_public_ const char *sd_utf8_is_valid(const char *s) {
- assert_return(s, NULL);
-
- return utf8_is_valid(s);
-}
-
-_public_ const char *sd_ascii_is_valid(const char *s) {
- assert_return(s, NULL);
-
- return ascii_is_valid(s);
-}
diff --git a/src/libsystemd/src/subdir.mk b/src/libsystemd/src/subdir.mk
index 605b592401..73c05740ce 100644
--- a/src/libsystemd/src/subdir.mk
+++ b/src/libsystemd/src/subdir.mk
@@ -20,10 +20,12 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\"
-sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+sd.CPPFLAGS += $(libsystemd.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-staging.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-basic.CPPFLAGS)
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk
index c823a360f2..a4d107ba6b 100644
--- a/src/libsystemd/src/test.mk
+++ b/src/libsystemd/src/test.mk
@@ -20,8 +20,6 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
-include $(topsrcdir)/build-aux/Makefile.head.mk
test_bus_marshal_SOURCES = \
src/libsystemd/sd-bus/test-bus-marshal.c
@@ -159,6 +157,3 @@ test_resolve_SOURCES = \
test_resolve_LDADD = \
libsystemd-shared.la
-
-
-include $(topsrcdir)/build-aux/Makefile.tail.mk