Date: Wed, 21 Aug 2013 21:23:33 +0900 From: 小林悠 <yukoba@...il.com> To: musl@...ts.openwall.com Subject: Re: SUN_LEN Hello. > which program needs it ? It is used in here. https://android.googlesource.com/platform/system/core/+/master/libcutils/properties.c > are these 2 lines meant to be connected with a \ ? Yes. Sorry, I'm using Gmail and the line was too long. Gmail splits a long line automatically. 2013/8/21 John Spencer <maillist-musl@...fooze.de>: > On 08/21/2013 11:57 AM, 小林悠 wrote: >> >> Hello. >> >> Could you please add SUN_LEN() to sys/un.h? > > > which program needs it ? > > >> >> 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; >> }; >> >> +#ifndef SUN_LEN >> +#include<string.h> > > > this looks like a namespace violation to me > > >> +#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) >> + strlen((ptr)->sun_path)) > > > are these 2 lines meant to be connected with a \ ? > as-is, this won't work... > > in glibc, it is defined as > # 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.