Re: getifaddrs() and CONFIG_PAGE_SIZE_16KB=y

Rich Felker <[email protected]>
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
On Sun, Mar 29, 2015 at 08:08:57PM +0200, nenhard wrote:
> Thanks, here is a workaround.
> Can someone do a proper patch?
> 
> diff -rup a/libc/inet/ifaddrs.c b/libc/inet/ifaddrs.c
> --- a/libc/inet/ifaddrs.c 2012-05-15 09:20:09.000000000 +0200
> +++ b/libc/inet/ifaddrs.c 2015-03-29 15:07:11.528316570 +0200
> @@ -119,7 +119,7 @@ __netlink_request (struct netlink_handle
>  {
>    struct netlink_res *nlm_next;
>    struct netlink_res **new_nlm_list;
> -  static volatile size_t buf_size = 4096;
> +  static volatile size_t buf_size = 16384;

I would get the value from PAGE_SIZE (if defined) or
sysconf(_SC_PAGE_SIZE) or whatever internal method uClibc has for
accessing this rather than hard-coding the larger size, which may be
problematic for extremely small systems that don't need it.

Rich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.