]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - socket/sys/un.h
Update.
[thirdparty/glibc.git] / socket / sys / un.h
index 03f36058bf2608698ffbc533e50225a23a58baf9..c2b177bae3404af35bdf07732bf3985ab2f739bc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,6 @@
 
 #include <sys/cdefs.h>
 
-#include <string.h>            /* For prototype of `strlen'.  */
-
 /* Get the definition of the macro to define the common sockaddr members.  */
 #include <bits/sockaddr.h>
 
@@ -36,9 +34,13 @@ struct sockaddr_un
   };
 
 
+#ifdef __USE_MISC
+# include <string.h>           /* For prototype of `strlen'.  */
+
 /* Evaluate to actual length of the `sockaddr_un' structure.  */
-#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)        \
+# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)       \
                      + strlen ((ptr)->sun_path))
+#endif
 
 __END_DECLS