mailing list of musl libc
 help / color / mirror / code / Atom feed
* SUN_LEN
@ 2013-08-21  9:57 小林悠
  2013-08-21 12:03 ` SUN_LEN John Spencer
  0 siblings, 1 reply; 18+ messages in thread
From: 小林悠 @ 2013-08-21  9:57 UTC (permalink / raw)
  To: musl

Hello.

Could you please add SUN_LEN() to sys/un.h?

diff --git a/include/sys/un.h b/include/sys/un.h
index 769dac6..5289227 100644
--- a/include/sys/un.h
+++ b/include/sys/un.h
@@ -10,4 +10,9 @@ struct sockaddr_un
        char sun_path[108];
 };

+#ifndef SUN_LEN
+#include <string.h>
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)
+ strlen((ptr)->sun_path))
+#endif
+
 #endif

-- 

Yu Kobayashi <yukoba@gmail.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-08-21 18:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21  9:57 SUN_LEN 小林悠
2013-08-21 12:03 ` SUN_LEN John Spencer
2013-08-21 12:23   ` SUN_LEN 小林悠
2013-08-21 12:38     ` SUN_LEN John Spencer
2013-08-21 13:27       ` SUN_LEN 小林悠
2013-08-21 14:45         ` SUN_LEN Szabolcs Nagy
2013-08-21 15:25           ` SUN_LEN 小林悠
2013-08-21 16:23           ` SUN_LEN Rich Felker
2013-08-21 16:34             ` SUN_LEN Szabolcs Nagy
2013-08-21 16:36               ` SUN_LEN Rich Felker
2013-08-21 16:42                 ` SUN_LEN Rich Felker
2013-08-21 17:00                   ` SUN_LEN Szabolcs Nagy
2013-08-21 17:11                     ` SUN_LEN Yu Kobayashi
2013-08-21 17:25                       ` SUN_LEN Rich Felker
2013-08-21 17:29                         ` SUN_LEN Yu Kobayashi
2013-08-21 17:58                           ` SUN_LEN Yu Kobayashi
2013-08-21 18:07                             ` SUN_LEN Rich Felker
2013-08-21 17:32                       ` SUN_LEN Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).