OSDN Git Service

- we may need getdomainname internally
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 13 Feb 2009 14:12:19 +0000 (14:12 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 13 Feb 2009 14:12:19 +0000 (14:12 -0000)
include/unistd.h
libc/sysdeps/linux/common/getdomainname.c

index eb0d945..e6154d2 100644 (file)
@@ -909,11 +909,14 @@ extern int sethostname (__const char *__name, size_t __len)
 extern int sethostid (long int __id) __THROW __wur;
 
 #if defined __UCLIBC_BSD_SPECIFIC__
+# if defined UCLIBC_INTERNAL
+/* separate preprocessor test for unifdef */
 /* Get and set the NIS (aka YP) domain name, if any.
    Called just like `gethostname' and `sethostname'.
    The NIS domain name is usually the empty string when not using NIS.  */
 extern int getdomainname (char *__name, size_t __len)
      __THROW __nonnull ((1)) __wur;
+# endif
 libc_hidden_proto(getdomainname)
 extern int setdomainname (__const char *__name, size_t __len)
      __THROW __nonnull ((1)) __wur;
index 20b0961..5cf8baa 100644 (file)
@@ -42,5 +42,7 @@ int getdomainname(char *name, size_t len)
 #endif
   return 0;
 }
+#ifdef __UCLIBC_BSD_SPECIFIC__
 libc_hidden_def(getdomainname)
 #endif
+#endif