[Buildroot] [PATCH 1/1] minissdpd: new package

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Jul 30 16:09:37 UTC 2016


Hello,

On Fri, 29 Jul 2016 16:28:37 +0200, Fabrice Fontaine wrote:

> diff --git a/package/minissdpd/0001-Set-_GNU_SOURCE-in-asyncsendto.c.patch b/package/minissdpd/0001-Set-_GNU_SOURCE-in-asyncsendto.c.patch
> new file mode 100644
> index 0000000..35854c5
> --- /dev/null
> +++ b/package/minissdpd/0001-Set-_GNU_SOURCE-in-asyncsendto.c.patch
> @@ -0,0 +1,32 @@
> +From 8ea177d974259c91f7e520d4b5b2abf07a1bbce2 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fabrice.fontaine at orange.com>
> +Date: Fri, 29 Jul 2016 13:32:09 +0200
> +Subject: [PATCH 1/1] Set _GNU_SOURCE in asyncsendto.c
> +
> +Add #define on _GNU_SOURCE at the very beginning of asyncsendto.c file
> +as this file uses in6_pktinfo which is protected by __USE_GNU in
> +libc/inet/netinet/in.h. Currently, this flag is set by the Makefile in
> +CFLAGS however CFLAGS could be overwritten by the build system.
> +
> +Signed-off-by: Fabrice Fontaine <fabrice.fontaine at orange.com>

Having a patch for this is a bit overkill IMO, so I've replaced that by
passing:

	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"

in the .mk file.

> +config BR2_PACKAGE_MINISSDPD
> +	bool "minissdpd"
> +	select BR2_PACKAGE_LIBNFNETLINK

Missing "depends on BR2_USE_MMU", since fork() is used.

> +NAME=minissdpd
> +PIDFILE=/var/run/$NAME.pid
> +DAEMON=/usr/sbin/$NAME
> +CFGFILE=/etc/default/$NAME
> +
> +IF=eth0

IF is not really a good variable name IMO, too close to the "if"
keyword. I renamed it to IFACE.

> +define MINISSDPD_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \

Passing TARGET_CONFIGURE_OPTS at install time wasn't needed.

> +Environment="IF=eth0"

I've also changed IF to IFACE here.

Applied with those changes.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list