diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-networking/recipes-protocols/mdns/files | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-protocols/mdns/files')
3 files changed, 224 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch new file mode 100644 index 0000000000..863866d18e --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch @@ -0,0 +1,42 @@ +From d3082d2c606c810aa0a39378bf1e02575af3a301 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Feb 2018 21:54:11 -0800 +Subject: [PATCH] nss_mdns: Do not include nss.h when libc != glibc + +Provide nss_status macro instead for non-glibc case +where nss.h is absent + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + mDNSPosix/nss_mdns.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/mDNSPosix/nss_mdns.c b/mDNSPosix/nss_mdns.c +index afadb3c..c469584 100755 +--- a/mDNSPosix/nss_mdns.c ++++ b/mDNSPosix/nss_mdns.c +@@ -378,8 +378,19 @@ init_config (); + + #define ENTNAME hostent + #define DATABASE "hosts" +- ++#ifdef __GLIBC__ + #include <nss.h> ++#else ++enum nss_status ++{ ++ NSS_STATUS_TRYAGAIN = -2, ++ NSS_STATUS_UNAVAIL, ++ NSS_STATUS_NOTFOUND, ++ NSS_STATUS_SUCCESS, ++ NSS_STATUS_RETURN ++}; ++#define NETDB_INTERNAL NULL ++#endif + // For nss_status + #include <netdb.h> + // For hostent +-- +2.16.1 + diff --git a/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch new file mode 100644 index 0000000000..4ab9d23bf7 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch @@ -0,0 +1,167 @@ +From 43b6e98c9c37afd0d914949dcff4eab81f5a995f Mon Sep 17 00:00:00 2001 +From: Brendan Le Foll <brendan.le.foll@intel.com> +Date: Tue, 3 Mar 2015 11:42:57 +0000 + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +--- + mDNSPosix/Makefile | 54 +++++++++++++++++++++++++----------------------------- + 1 file changed, 25 insertions(+), 29 deletions(-) + +diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile +index 4f98e90..8ac97ad 100755 +--- a/mDNSPosix/Makefile ++++ b/mDNSPosix/Makefile +@@ -50,6 +50,7 @@ + + LIBVERS = 1 + ++POSIXDIR = ../mDNSPosix + COREDIR = ../mDNSCore + SHAREDDIR ?= ../mDNSShared + JDK = /usr/jdk +@@ -58,11 +59,11 @@ CC = @cc + BISON = @bison + FLEX = @flex + ST = @strip +-LD = ld -shared ++LD =@LD + CP = cp + RM = rm + LN = ln -s -f +-CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" ++CFLAGS_COMMON = -I$(POSIXDIR) -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" + CFLAGS_PTHREAD = + LINKOPTS = + LINKOPTS_PTHREAD = -lpthread +@@ -70,7 +71,7 @@ LDSUFFIX = so + JAVACFLAGS_OS = -fPIC -shared -ldns_sd + + # Set up diverging paths for debug vs. prod builds +-DEBUG=0 ++DEBUG?=1 + ifeq ($(DEBUG),1) + CFLAGS_DEBUG = -g -DMDNS_DEBUGMSGS=2 + OBJDIR = objects/debug +@@ -213,7 +214,7 @@ endif + endif + endif + +-CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) ++CFLAGS_BUILD = $(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) + + ############################################################################# + +@@ -249,8 +250,7 @@ Daemon: setup $(BUILDDIR)/mdnsd + @echo "Responder daemon done" + + $(BUILDDIR)/mdnsd: $(DAEMONOBJS) +- $(CC) -o $@ $+ $(LINKOPTS) +- @$(STRIP) $@ ++ $(CC) -o $@ $+ + + # libdns_sd target builds the client library + libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) +@@ -259,22 +259,18 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) + CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o + + $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) +- @$(LD) $(LINKOPTS) -o $@ $+ +- @$(STRIP) $@ ++ $(LD) -shared $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+ + +-Clients: setup libdns_sd ../Clients/build/dns-sd ++Clients: setup libdns_sd ++ @$(MAKE) -C ../Clients DEBUG=${DEBUG} + @echo "Clients done" + +-../Clients/build/dns-sd: +- @$(MAKE) -C ../Clients +- + # nss_mdns target builds the Name Service Switch module + nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE) + @echo "Name Service Switch module done" + + $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o +- @$(LD) $(LINKOPTS) -o $@ $+ +- @$(STRIP) $@ ++ $(LD) -shared $(LINKOPTS) -o $@ $+ + + ############################################################################# + +@@ -470,55 +466,55 @@ dnsextd: setup $(BUILDDIR)/dnsextd + @echo "dnsextd done" + + $(BUILDDIR)/mDNSClientPosix: $(APPOBJ) $(OBJDIR)/Client.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSResponderPosix: $(COMMONOBJ) $(OBJDIR)/Responder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ) $(OBJDIR)/ProxyResponder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSIdentify: $(SPECIALOBJ) $(OBJDIR)/Identify.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(OBJDIR)/Identify.c.o: $(COREDIR)/mDNS.c # Note: Identify.c textually imports mDNS.c + + $(BUILDDIR)/mDNSNetMonitor: $(SPECIALOBJ) $(OBJDIR)/NetMonitor.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(OBJDIR)/NetMonitor.c.o: $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c + + $(BUILDDIR)/dnsextd: $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o +- $(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD) ++ $(CC) $+ -o $@ $(LINKOPTS_PTHREAD) + + ############################################################################# + + # Implicit rules + $(OBJDIR)/%.c.o: %.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.o: $(COREDIR)/%.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.threadsafe.o: %.c +- $(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< + + $(OBJDIR)/%.c.threadsafe.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< + + $(OBJDIR)/%.c.so.o: %.c +- $(CC) $(CFLAGS) -c -fPIC -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $< + + $(OBJDIR)/%.c.so.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) -c -fPIC -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $< + + $(OBJDIR)/%.y.o: $(SHAREDDIR)/%.y + $(BISON) -o $(OBJDIR)/$*.c -d $< +- $(CC) $(CFLAGS) -c -o $@ $(OBJDIR)/$*.c ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $(OBJDIR)/$*.c + + $(OBJDIR)/%.l.o: $(SHAREDDIR)/%.l + $(FLEX) $(FLEXFLAGS_OS) -i -o$(OBJDIR)/$*.l.c $< +- $(CC) $(CFLAGS) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c ++ $(CC) $(CFLAGS_BUILD) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c +-- +2.9.5 + diff --git a/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service new file mode 100644 index 0000000000..531d142dcd --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service @@ -0,0 +1,15 @@ +[Unit] +Description=Zero-configuration networking +After=network.target + +[Service] +Type=forking +ExecStartPre=/bin/rm -f /var/run/mdnsd.pid +ExecStart=/usr/sbin/mdnsd +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/mdnsd.pid +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target |