summaryrefslogtreecommitdiff
path: root/source3/lib/replace/replace.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-01 23:18:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:06 -0500
commita2bbf608d21ff8de129aae726a426eac5d65a67f (patch)
treed1d5e6e563023a052fabd34c5f49e2bd44c918ad /source3/lib/replace/replace.h
parent82a549770e0743850fb81e00ec6a869c7c73a2fb (diff)
downloadsamba-a2bbf608d21ff8de129aae726a426eac5d65a67f.tar.gz
samba-a2bbf608d21ff8de129aae726a426eac5d65a67f.tar.bz2
samba-a2bbf608d21ff8de129aae726a426eac5d65a67f.zip
r25455: Ensure we have inet_ntop and inet_pton available in lib/replace.
Jeremy. (This used to be commit 1f719905440d4c87c526c56532f47d894cfec5f0)
Diffstat (limited to 'source3/lib/replace/replace.h')
-rw-r--r--source3/lib/replace/replace.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/source3/lib/replace/replace.h b/source3/lib/replace/replace.h
index af05516e8c..907d9b0086 100644
--- a/source3/lib/replace/replace.h
+++ b/source3/lib/replace/replace.h
@@ -1,15 +1,16 @@
-/*
+/*
Unix SMB/CIFS implementation.
macros to go along with the lib/replace/ portability layer code
Copyright (C) Andrew Tridgell 2005
Copyright (C) Jelmer Vernooij 2006
+ Copyright (C) Jeremy Allison 2007.
** NOTE! The following LGPL license applies to the replace
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -71,7 +72,6 @@
#include <stddef.h>
#endif
-
#ifndef HAVE_STRERROR
extern char *sys_errlist[];
#define strerror(i) sys_errlist[i]
@@ -330,6 +330,20 @@ ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
#endif
+#ifndef HAVE_INET_PTON
+#define inet_pton rep_inet_pton
+int rep_inet_pton(int af, const char *src, void *dst);
+#endif
+
+#ifndef HAVE_INET_NTOP
+#define inet_ntop rep_inet_ntop
+const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
+#endif
+
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT EINVAL
+#endif
+
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif