summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/if_index.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-07 15:57:26 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-07 15:57:26 +0000
commit263456bdd443ebe492e8389fc500c6a28342793c (patch)
treeff40c7da398d8a1e2b1a822a86af4dadb75c5409 /sysdeps/unix/sysv/linux/if_index.c
parentf21aa4c28f70da7efccf44f4be0d5239ac0aa711 (diff)
Update.
1999-06-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/if_index.c: Use SIGIOCGIFINDEX and fix another SIOGIFNAME typo. 1999-06-07 Ulrich Drepper <drepper@cygnus.com> * elf/dl-lookup.c: Remove duplicated assert.h inclusion. * sysdeps/generic/printf_fphex.c (__printf_fphex): Optimize a little bit. 1999-06-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/generic/printf_fphex.c (__printf_fphex): Don't ignore the precision if the mantissa is zero. 1999-06-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * manual/lang.texi (Floating Point Parameters): GCC already supports long double for a long time. 1999-06-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * math/libm-test.c (j0_test, j1_test, jn_test, y0_test, y1_test, yn_test): Increase some epsilons.
Diffstat (limited to 'sysdeps/unix/sysv/linux/if_index.c')
-rw-r--r--sysdeps/unix/sysv/linux/if_index.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c
index 67fba93cd4..9634aa794f 100644
--- a/sysdeps/unix/sysv/linux/if_index.c
+++ b/sysdeps/unix/sysv/linux/if_index.c
@@ -29,7 +29,7 @@
#include "kernel-features.h"
/* Try to get a socket to talk to the kernel. */
-#if defined SIOGIFINDEX || defined SIOGIFNAME
+#if defined SIOCGIFINDEX || defined SIOCGIFNAME
static int
internal_function
opensock (void)
@@ -73,7 +73,7 @@ opensock (void)
unsigned int
if_nametoindex (const char *ifname)
{
-#ifndef SIOGIFINDEX
+#ifndef SIOCGIFINDEX
__set_errno (ENOSYS);
return 0;
#else
@@ -84,7 +84,7 @@ if_nametoindex (const char *ifname)
return 0;
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
- if (__ioctl (fd, SIOGIFINDEX, &ifr) < 0)
+ if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
{
int saved_errno = errno;
__close (fd);
@@ -113,7 +113,7 @@ if_freenameindex (struct if_nameindex *ifn)
struct if_nameindex *
if_nameindex (void)
{
-#ifndef SIOGIFINDEX
+#ifndef SIOCGIFINDEX
__set_errno (ENOSYS);
return NULL;
#else
@@ -180,7 +180,7 @@ if_nameindex (void)
struct ifreq *ifr = &ifc.ifc_req[i];
idx[i].if_name = __strdup (ifr->ifr_name);
if (idx[i].if_name == NULL
- || __ioctl (fd, SIOGIFINDEX, ifr) < 0)
+ || __ioctl (fd, SIOCGIFINDEX, ifr) < 0)
{
int saved_errno = errno;
unsigned int j;
@@ -207,7 +207,7 @@ if_nameindex (void)
char *
if_indextoname (unsigned int ifindex, char *ifname)
{
-#if !defined SIOGIFINDEX && __ASSUME_SIOCGIFNAME == 0
+#if !defined SIOCGIFINDEX && __ASSUME_SIOCGIFNAME == 0
__set_errno (ENOSYS);
return NULL;
#else