mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start: go): Fix arg type.
* sysdeps/mach/hurd/if_index.c (if_nameindex): Use size_t for AMOUNT argument to pfinet_siocgifconf RPC.
This commit is contained in:
@@ -7,6 +7,10 @@
|
|||||||
(_dl_init_first): Likewise.
|
(_dl_init_first): Likewise.
|
||||||
(_hurd_stack_setup): Likewise.
|
(_hurd_stack_setup): Likewise.
|
||||||
(init1): Add a cast.
|
(init1): Add a cast.
|
||||||
|
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start: go): Fix arg type.
|
||||||
|
|
||||||
|
* sysdeps/mach/hurd/if_index.c (if_nameindex): Use size_t for AMOUNT
|
||||||
|
argument to pfinet_siocgifconf RPC.
|
||||||
|
|
||||||
2002-06-13 Andreas Schwab <schwab@suse.de>
|
2002-06-13 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
@@ -113,7 +113,7 @@ _dl_sysdep_start (void **start_argptr,
|
|||||||
void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phent,
|
void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phent,
|
||||||
ElfW(Addr) *user_entry))
|
ElfW(Addr) *user_entry))
|
||||||
{
|
{
|
||||||
void go (int *argdata)
|
void go (intptr_t *argdata)
|
||||||
{
|
{
|
||||||
extern unsigned int _dl_skip_args; /* rtld.c */
|
extern unsigned int _dl_skip_args; /* rtld.c */
|
||||||
char **p;
|
char **p;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* Find network interface names and index numbers. Hurd version.
|
/* Find network interface names and index numbers. Hurd version.
|
||||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 2000,01,02 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -80,7 +80,6 @@ if_nameindex (void)
|
|||||||
struct if_nameindex *idx = NULL;
|
struct if_nameindex *idx = NULL;
|
||||||
|
|
||||||
ifc.ifc_buf = data;
|
ifc.ifc_buf = data;
|
||||||
ifc.ifc_len = sizeof (data);
|
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -90,8 +89,8 @@ if_nameindex (void)
|
|||||||
nifs = 0;
|
nifs = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf,
|
size_t len = sizeof data;
|
||||||
&ifc.ifc_len);
|
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf, &len);
|
||||||
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
||||||
{
|
{
|
||||||
/* On the first use of the socket server during the operation,
|
/* On the first use of the socket server during the operation,
|
||||||
@@ -99,13 +98,13 @@ if_nameindex (void)
|
|||||||
server = _hurd_socket_server (PF_INET, 1);
|
server = _hurd_socket_server (PF_INET, 1);
|
||||||
if (server == MACH_PORT_NULL)
|
if (server == MACH_PORT_NULL)
|
||||||
goto out;
|
goto out;
|
||||||
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf,
|
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf, &len);
|
||||||
&ifc.ifc_len);
|
|
||||||
}
|
}
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
nifs = ifc.ifc_len / sizeof (struct ifreq);
|
ifc.ifc_len = len;
|
||||||
|
nifs = len / sizeof (struct ifreq);
|
||||||
}
|
}
|
||||||
|
|
||||||
idx = malloc ((nifs + 1) * sizeof (struct if_nameindex));
|
idx = malloc ((nifs + 1) * sizeof (struct if_nameindex));
|
||||||
|
Reference in New Issue
Block a user