summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-10-08 10:22:35 +0000
committerArthur de Jong <arthur@arthurdejong.org>2010-10-08 10:22:35 +0000
commitb863dc2636061c93d74c980e93d54fbf107d0fda (patch)
tree8f58c09aaddf1f061c75e6bb9cd2679d51123b68
parentd5c07d9403bc42f08de10331979a73f2db399b59 (diff)
move missing declarations of ether_ntoa() and ether_aton() to header file so they are available for other sources also
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1243 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--compat/ether.c14
-rw-r--r--compat/ether.h17
2 files changed, 16 insertions, 15 deletions
diff --git a/compat/ether.c b/compat/ether.c
index f02576c..ec42909 100644
--- a/compat/ether.c
+++ b/compat/ether.c
@@ -36,13 +36,6 @@
/* these functions are not really reentrant */
#ifndef HAVE_ETHER_NTOA_R
-
-#if !HAVE_DECL_ETHER_NTOA
-/* we define ether_ntoa() here because on some platforms the function is
- underfined */
-extern char *ether_ntoa(const struct ether_addr *e);
-#endif /* not HAVE_DECL_ETHER_NTOA */
-
char *ether_ntoa_r(const struct ether_addr *addr,char *buf)
{
char *tmp;
@@ -55,13 +48,6 @@ char *ether_ntoa_r(const struct ether_addr *addr,char *buf)
#endif /* not HAVE_ETHER_NTOA_R */
#ifndef HAVE_ETHER_ATON_R
-
-#if !HAVE_DECL_ETHER_ATON
-/* we define ether_aton() here because on some platforms the function is
- underfined */
-extern struct ether_addr *ether_aton(const char *s);
-#endif /* not HAVE_DECL_ETHER_ATON */
-
struct ether_addr *ether_aton_r(const char *asc,struct ether_addr *addr)
{
struct ether_addr *tmp;
diff --git a/compat/ether.h b/compat/ether.h
index 40f1c8c..6dea967 100644
--- a/compat/ether.h
+++ b/compat/ether.h
@@ -45,5 +45,20 @@ char *ether_ntoa_r(const struct ether_addr *addr,char *buf);
struct ether_addr *ether_aton_r(const char *asc,struct ether_addr *addr);
#endif /* not HAVE_ETHER_ATON_R */
-#endif /* not COMPAT__ETHER_H */
+#ifdef HAVE_ETHER_NTOA
+#if !HAVE_DECL_ETHER_NTOA
+/* we define ether_ntoa() here because on some platforms the function is
+ underfined */
+extern char *ether_ntoa(const struct ether_addr *e);
+#endif /* not HAVE_DECL_ETHER_NTOA */
+#endif /* HAVE_ETHER_NTOA */
+
+#ifdef HAVE_ETHER_ATON
+#if !HAVE_DECL_ETHER_ATON
+/* we define ether_aton() here because on some platforms the function is
+ underfined */
+extern struct ether_addr *ether_aton(const char *s);
+#endif /* not HAVE_DECL_ETHER_ATON */
+#endif /* HAVE_ETHER_ATON */
+#endif /* not COMPAT__ETHER_H */