From d5c6d80ff1b617419dfcadb2fea4710d14f34b98 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Mon, 2 Feb 2004 18:10:29 -0800 Subject: [PATCH] [PATCH] let udevsend build with klibc > I don't mind udevd using glibc, I just want the programs that get run a > lot of different times (udev and udevsend) to be as small as possible to > get the best cache results. As udevd sticks around all the time, it's > not as important. Sound sane to you? Oh, nice. Good idea. --- Makefile | 4 ++-- klibc/klibc/include/sys/un.h | 10 ++++++++++ udevsend.c | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 klibc/klibc/include/sys/un.h diff --git a/Makefile b/Makefile index 386583b7..dd2f6975 100644 --- a/Makefile +++ b/Makefile @@ -161,12 +161,12 @@ else CFLAGS += $(WARNINGS) -I$(GCCINCDIR) LIB_OBJS = -lc LDFLAGS = - UDEVD = $(DAEMON) $(SENDER) + UDEVD = $(DAEMON) endif CFLAGS += -I$(PWD)/libsysfs -all: $(ROOT) $(UDEVD) $(HELPER) +all: $(ROOT) $(SENDER) $(UDEVD) $(HELPER) @extras="$(EXTRAS)" ; for target in $$extras ; do \ echo $$target ; \ $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \ diff --git a/klibc/klibc/include/sys/un.h b/klibc/klibc/include/sys/un.h new file mode 100644 index 00000000..85822ba6 --- /dev/null +++ b/klibc/klibc/include/sys/un.h @@ -0,0 +1,10 @@ +/* + * sys/un.h + */ + +#ifndef _UN_H +#define _UN_H + +#include + +#endif /* _UN_H */ diff --git a/udevsend.c b/udevsend.c index 415207d8..fd61cb2a 100644 --- a/udevsend.c +++ b/udevsend.c @@ -163,7 +163,7 @@ int main(int argc, char* argv[]) strcpy(saddr.sun_path, UDEVD_SOCK); /* try to connect, if it fails start daemon */ - retval = connect(sock, &saddr, sizeof(saddr)); + retval = connect(sock, (struct sockaddr *) &saddr, sizeof(saddr)); if (retval != -1) { goto send; } else { @@ -182,7 +182,7 @@ int main(int argc, char* argv[]) tspec.tv_nsec = 100000000; /* 100 millisec */ loop = UDEVSEND_CONNECT_RETRY; while (loop--) { - retval = connect(sock, &saddr, sizeof(saddr)); + retval = connect(sock, (struct sockaddr *) &saddr, sizeof(saddr)); if (retval != -1) goto send; else -- 2.39.5