X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=util.c;h=f0517b42fe30837ba7ef37712e1dc0ac727fc28b;hp=05f02b2061181e03c167aa3737b8fbd8d797c091;hb=5f9a8bc2110193897f3352aa1001780f18e223cc;hpb=444987db98c88dfef6b3965051bf2aba6114aaa2 diff --git a/util.c b/util.c index 05f02b2..f0517b4 100644 --- a/util.c +++ b/util.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include @@ -39,20 +37,6 @@ int debug = 0; char mdns_hostname[HOSTNAME_LEN]; char mdns_hostname_local[HOSTNAME_LEN + 6]; -static void -signal_shutdown(int signal) -{ - uloop_end(); -} - -void -signal_setup(void) -{ - signal(SIGPIPE, SIG_IGN); - signal(SIGTERM, signal_shutdown); - signal(SIGKILL, signal_shutdown); -} - uint32_t rand_time_delta(uint32_t t) { @@ -89,14 +73,3 @@ void get_hostname(void) snprintf(mdns_hostname, sizeof(mdns_hostname), "%s", utsname.nodename); snprintf(mdns_hostname_local, sizeof(mdns_hostname_local), "%s.local", utsname.nodename); } - -void* -memdup(const void *d, int l) -{ - void *r = malloc(l); - if (!r) - return NULL; - memcpy(r, d, l); - return r; -} -