[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.
This commit is contained in:
parent
0be0c18de3
commit
d5c6d80ff1
4
Makefile
4
Makefile
|
@ -161,12 +161,12 @@ else
|
||||||
CFLAGS += $(WARNINGS) -I$(GCCINCDIR)
|
CFLAGS += $(WARNINGS) -I$(GCCINCDIR)
|
||||||
LIB_OBJS = -lc
|
LIB_OBJS = -lc
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
UDEVD = $(DAEMON) $(SENDER)
|
UDEVD = $(DAEMON)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -I$(PWD)/libsysfs
|
CFLAGS += -I$(PWD)/libsysfs
|
||||||
|
|
||||||
all: $(ROOT) $(UDEVD) $(HELPER)
|
all: $(ROOT) $(SENDER) $(UDEVD) $(HELPER)
|
||||||
@extras="$(EXTRAS)" ; for target in $$extras ; do \
|
@extras="$(EXTRAS)" ; for target in $$extras ; do \
|
||||||
echo $$target ; \
|
echo $$target ; \
|
||||||
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
|
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* sys/un.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _UN_H
|
||||||
|
#define _UN_H
|
||||||
|
|
||||||
|
#include <linux/un.h>
|
||||||
|
|
||||||
|
#endif /* _UN_H */
|
|
@ -163,7 +163,7 @@ int main(int argc, char* argv[])
|
||||||
strcpy(saddr.sun_path, UDEVD_SOCK);
|
strcpy(saddr.sun_path, UDEVD_SOCK);
|
||||||
|
|
||||||
/* try to connect, if it fails start daemon */
|
/* 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) {
|
if (retval != -1) {
|
||||||
goto send;
|
goto send;
|
||||||
} else {
|
} else {
|
||||||
|
@ -182,7 +182,7 @@ int main(int argc, char* argv[])
|
||||||
tspec.tv_nsec = 100000000; /* 100 millisec */
|
tspec.tv_nsec = 100000000; /* 100 millisec */
|
||||||
loop = UDEVSEND_CONNECT_RETRY;
|
loop = UDEVSEND_CONNECT_RETRY;
|
||||||
while (loop--) {
|
while (loop--) {
|
||||||
retval = connect(sock, &saddr, sizeof(saddr));
|
retval = connect(sock, (struct sockaddr *) &saddr, sizeof(saddr));
|
||||||
if (retval != -1)
|
if (retval != -1)
|
||||||
goto send;
|
goto send;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue