This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
written by Mike Frysinger
https://sourceforge.net/tracker/?func=detail&aid=3132053&group_id=5616&atid=305616
Rather than using the fork function (which doesnt work on nommu
systems), simply use the daemon() function instead (which does
work). this should work the same before and after for all systems.
--- a/irattach/util.c
+++ b/irattach/util.c
@@ -156,21 +156,10 @@
void fork_now(int ttyfd)
{
- int ret;
int i;
- if ((ret = fork()) > 0)
- exit(0);
-
- if (ret == -1)
- syslog(LOG_INFO, "forking: %m");
- if (setsid() < 0)
- syslog(LOG_INFO, "detaching from tty: %m");
-
- if ((ret = fork()) > 0) {
- /* cleanup_files = 0; */
- exit(0);
- }
+ if (daemon(1, 1))
+ syslog(LOG_INFO, "daemon: %m");
/* Close all open inherited files! Except for ttyfd! */
for (i = 0; i < 64; i++)

View File

@@ -0,0 +1,24 @@
written by Mike Frysinger
https://sourceforge.net/tracker/?func=detail&aid=3132056&group_id=5616&atid=305616
nommu systems cannot fork() as the hardware cannot support
it. irattach uses it as a minor optimization, but it isnt
necessary for correct functioning of the utility. so add a
NO_FORK define so we nommu peeps can do CFLAGS="... -DNO_FORK=1
..." and use it in our embedded systems.
--- a/irattach/irattach.c
+++ b/irattach/irattach.c
@@ -397,7 +397,11 @@
after_names[i]);
/* Create a new instance for this other
* interface */
+#ifdef NO_FORK
+ pid = -1;
+#else
pid = fork();
+#endif
/* If in the child */
if(!pid) {
/* Get the interface name */

View File

@@ -0,0 +1,23 @@
written by Mike Frysinger
https://sourceforge.net/tracker/?func=detail&aid=3132051&group_id=5616&atid=305616
The top level makefile ignores build/install errors in subdirs which makes
packaging a pain to verify.
--- a/Makefile
+++ b/Makefile
@@ -31,11 +31,11 @@
CFLAGS= -O2 -W -Wall
all:
- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
install:
- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
clean:

View File

@@ -0,0 +1,31 @@
Replace use of <net/if_packet.h> with <linux/if_packet.h>.
kernel headers <linux/if_packet.h> already provides the
needed definitions, moreover not all libc implementations
provide if_packet.h e.g. musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
[From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch.]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Index: irda-utils-0.9.18/irdaping/irdaping.c
===================================================================
--- irda-utils-0.9.18.orig/irdaping/irdaping.c
+++ irda-utils-0.9.18/irdaping/irdaping.c
@@ -33,7 +33,6 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h> /* For struct ifreq */
-#include <net/if_packet.h> /* For struct sockaddr_pkt */
#include <net/if_arp.h> /* For ARPHRD_IRDA */
#include <netinet/if_ether.h> /* For ETH_P_ALL */
#include <netinet/in.h> /* For htons */
@@ -46,6 +45,7 @@
#include <asm/byteorder.h> /* __cpu_to_le32 and co. */
#include <linux/types.h> /* For __u8 and co. */
+#include <linux/if_packet.h> /* For struct sockaddr_pkt */
#include <irda.h>
#ifndef AF_IRDA

View File

@@ -0,0 +1,19 @@
config BR2_PACKAGE_IRDA_UTILS
bool "irda-utils"
help
user space utilities which control the IrDA stack
http://irda.sourceforge.net/
if BR2_PACKAGE_IRDA_UTILS
config BR2_PACKAGE_IRDA_UTILS_IRATTACH
bool "irattach"
config BR2_PACKAGE_IRDA_UTILS_IRDAPING
bool "irdaping"
config BR2_PACKAGE_IRDA_UTILS_IRNETD
bool "irnetd"
endif

View File

@@ -0,0 +1,2 @@
# Locally computed:
sha256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6 irda-utils-0.9.18.tar.gz

View File

@@ -0,0 +1,39 @@
################################################################################
#
# irda-utils
#
################################################################################
IRDA_UTILS_VERSION = 0.9.18
IRDA_UTILS_SITE = http://downloads.sourceforge.net/project/irda/irda-utils/$(IRDA_UTILS_VERSION)
IRDA_UTILS_LICENSE = GPL-2.0+
IRDA_UTILS_LICENSE_FILES = man/COPYING
IRDA_UTILS_CFLAGS = $(TARGET_CFLAGS) -I.
ifeq ($(BR2_USE_MMU),)
IRDA_UTILS_CFLAGS += -DNO_FORK=1
endif
define IRDA_UTILS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
CC="$(TARGET_CC)" \
CFLAGS="$(IRDA_UTILS_CFLAGS)" \
SYS_INCLUDES= \
DIRS="irattach irdaping irnetd" \
V=1 -C $(@D)
endef
IRDA_UTILS_SBINS- =
IRDA_UTILS_SBINS-y =
IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRATTACH) += irattach
IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRDAPING) += irdaping
IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRNETD) += irnetd
IRDA_UTILS_SBINS- += $(IRDA_UTILS_SBINS-y)
define IRDA_UTILS_INSTALL_TARGET_CMDS
for i in $(IRDA_UTILS_SBINS-y); do \
$(INSTALL) -m 0755 -D $(@D)/$$i/$$i $(TARGET_DIR)/usr/sbin/$$i || exit 1; \
done
endef
$(eval $(generic-package))