Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOayUkaLQ1raZJCM6ZwK_kq8anHRhBLpVgGyeM7k1ooXtv_4Ng@mail.gmail.com>
Date: Wed, 21 Aug 2013 18:57:35 +0900
From: 小林悠 <yukoba@...il.com>
To: musl@...ts.openwall.com
Subject: SUN_LEN

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@...il.com>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.