diff options
| -rw-r--r-- | avahi-common/domain-test.c | 4 | ||||
| -rw-r--r-- | avahi-common/malloc.c | 10 | ||||
| -rw-r--r-- | avahi-common/timeval-test.c | 2 | 
3 files changed, 12 insertions, 4 deletions
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c index 279be72..9926a1f 100644 --- a/avahi-common/domain-test.c +++ b/avahi-common/domain-test.c @@ -58,13 +58,13 @@ int main(int argc, char *argv[]) {      printf("%u = %u\n", avahi_domain_hash("ccc\\065aa.aa\\.b\\\\."), avahi_domain_hash("cccAaa.aa\\.b\\\\")); -    avahi_service_name_join(t, sizeof(t), "foo.foo.foo \.", "_http._tcp", "test.local"); +    avahi_service_name_join(t, sizeof(t), "foo.foo.foo \\.", "_http._tcp", "test.local");      printf("<%s>\n", t);      avahi_service_name_split(t, name, sizeof(name), type, sizeof(type), domain, sizeof(domain));      printf("name: <%s>; type: <%s>; domain <%s>\n", name, type, domain); -    avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\. .local"); +    avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\\. .local");      printf("<%s>\n", t);      avahi_service_name_split(t, NULL, 0, type, sizeof(type), domain, sizeof(domain)); diff --git a/avahi-common/malloc.c b/avahi-common/malloc.c index 52e0962..51b8ff6 100644 --- a/avahi-common/malloc.c +++ b/avahi-common/malloc.c @@ -31,6 +31,14 @@  #include "malloc.h" +#ifndef va_copy +#ifdef __va_copy +#define va_copy(DEST,SRC) __va_copy((DEST),(SRC)) +#else +#define va_copy(DEST,SRC) memcpy(&(DEST), &(SRC), sizeof(va_list)) +#endif +#endif +  static const AvahiAllocator *allocator = NULL;  static void oom(void) AVAHI_GCC_NORETURN; @@ -206,9 +214,7 @@ char *avahi_strdup_vprintf(const char *fmt, va_list ap) {          va_list ap2;          va_copy (ap2, ap); -                  n = vsnprintf(buf, len, fmt, ap2); -          va_end (ap2);          if (n >= 0 && n < (int) len) diff --git a/avahi-common/timeval-test.c b/avahi-common/timeval-test.c index 7dedf41..4b594d4 100644 --- a/avahi-common/timeval-test.c +++ b/avahi-common/timeval-test.c @@ -38,4 +38,6 @@ int main(int argc, char *argv[]) {      printf("%li.%li\n", a.tv_sec, a.tv_usec);      printf("%lli\n", avahi_timeval_diff(&a, &b)); + +    return 0;  }  | 
