Include complete fake-getname/addrinfo from OpenSSH.
[tinc] / lib / fake-getnameinfo.h
diff --git a/lib/fake-getnameinfo.h b/lib/fake-getnameinfo.h
new file mode 100644 (file)
index 0000000..3f215e1
--- /dev/null
@@ -0,0 +1,23 @@
+/* $Id: fake-getnameinfo.h,v 1.1.2.1 2002/07/12 11:45:21 guus Exp $ */
+
+#ifndef _FAKE_GETNAMEINFO_H
+#define _FAKE_GETNAMEINFO_H
+
+#include "config.h"
+
+#include <sys/socket.h>
+#include <netdb.h>
+
+#ifndef HAVE_GETNAMEINFO
+int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, 
+                size_t hostlen, char *serv, size_t servlen, int flags);
+#endif /* !HAVE_GETNAMEINFO */
+
+#ifndef NI_MAXSERV
+# define NI_MAXSERV 32
+#endif /* !NI_MAXSERV */
+#ifndef NI_MAXHOST
+# define NI_MAXHOST 1025
+#endif /* !NI_MAXHOST */
+
+#endif /* _FAKE_GETNAMEINFO_H */