Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1383630154-2628-1-git-send-email-mforney@mforney.org>
Date: Mon,  4 Nov 2013 21:42:34 -0800
From: Michael Forney <mforney@...rney.org>
To: musl@...ts.openwall.com
Subject: [PATCH] Fix dn_comp prototype and add stub

---
This function is used at least by ping6 from iputils, and if there is a header
declaration, there should at least be a stub.

 include/resolv.h      | 2 +-
 src/network/dn_comp.c | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 src/network/dn_comp.c

diff --git a/include/resolv.h b/include/resolv.h
index 259e4bc..cfa5d9d 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -133,7 +133,7 @@ int res_querydomain(const char *, const char *, int, int, unsigned char *, int);
 int res_search(const char *, int, int, unsigned char *, int);
 int res_mkquery(int, const char *, int, int, char *, int, struct rrec *, char *, int);
 int res_send(const char *, int, char *, int);
-int dn_comp(unsigned char *, unsigned char *, int, unsigned char **, unsigned char *, unsigned char **);
+int dn_comp(unsigned char *, unsigned char *, int, unsigned char **, unsigned char **);
 int dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
 int dn_skipname(const unsigned char *, const unsigned char *);
 
diff --git a/src/network/dn_comp.c b/src/network/dn_comp.c
new file mode 100644
index 0000000..fe31cd7
--- /dev/null
+++ b/src/network/dn_comp.c
@@ -0,0 +1,9 @@
+#include <resolv.h>
+#include "libc.h"
+
+int __dn_comp(unsigned char *src, unsigned char *dst, int space, unsigned char **dnptrs, unsigned char **lastdnptr)
+{
+	return -1;
+}
+
+weak_alias(__dn_comp, dn_comp);
-- 
1.8.4.2

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.