summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/replace.h10
-rw-r--r--source4/lib/replace/system/network.h12
2 files changed, 18 insertions, 4 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index fcf75635a7..e42d5ff168 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -325,15 +325,19 @@ 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
+#ifdef REPLACE_INET_NTOA
+#define inet_ntoa rep_inet_ntoa
+/* prototype is in "system/network.h" */
+#endif
+
#ifndef HAVE_INET_PTON
-int rep_inet_pton(int af, const char *src, void *dst);
#define inet_pton rep_inet_pton
+/* prototype is in "system/network.h" */
#endif
#ifndef HAVE_INET_NTOP
-#include "system/network.h"
-const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define inet_ntop rep_inet_ntop
+/* prototype is in "system/network.h" */
#endif
#ifdef HAVE_LIMITS_H
diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h
index 02942f9a44..8b911cf7d3 100644
--- a/source4/lib/replace/system/network.h
+++ b/source4/lib/replace/system/network.h
@@ -90,8 +90,18 @@
#endif
#ifdef REPLACE_INET_NTOA
+/* define is in "replace.h" */
char *rep_inet_ntoa(struct in_addr ip);
-#define inet_ntoa rep_inet_ntoa
+#endif
+
+#ifndef HAVE_INET_PTON
+/* define is in "replace.h" */
+int rep_inet_pton(int af, const char *src, void *dst);
+#endif
+
+#ifndef HAVE_INET_NTOP
+/* define is in "replace.h" */
+const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#endif
/*