summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ifaddrs.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-07-25 21:19:13 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-07-25 21:19:13 +0000
commit89b4b02f421d2a6d24eb632d9c6977dbe786e6ee (patch)
treecfb4d8f06f24847cb5214a0bb2bc476085415706 /sysdeps/unix/sysv/linux/ifaddrs.c
parent842a39cd1ad9391af7a63a19c87f66a730e027a9 (diff)
downloadglibc-89b4b02f421d2a6d24eb632d9c6977dbe786e6ee.tar.gz
glibc-89b4b02f421d2a6d24eb632d9c6977dbe786e6ee.tar.xz
glibc-89b4b02f421d2a6d24eb632d9c6977dbe786e6ee.zip
Remove pre-2.4.21 Linux kernel support.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ifaddrs.c')
-rw-r--r--sysdeps/unix/sysv/linux/ifaddrs.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index 51836b0dcd..179653103e 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -1,5 +1,5 @@
 /* getifaddrs -- get names and addresses of all network interfaces
-   Copyright (C) 2003-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,17 +37,6 @@
 #include "netlinkaccess.h"
 
 
-/* We don't know if we have NETLINK support compiled into our
-   Kernel, so include the old implementation as fallback.  */
-#if __ASSUME_NETLINK_SUPPORT == 0
-int __no_netlink_support attribute_hidden;
-
-# define getifaddrs fallback_getifaddrs
-# include "sysdeps/gnu/ifaddrs.c"
-# undef getifaddrs
-#endif
-
-
 /* There is a problem with this type.  The address length for
    Infiniband sockets is much longer than the 8 bytes allocated in the
    sockaddr_ll definition.  Hence we use here a special
@@ -274,9 +263,6 @@ __netlink_open (struct netlink_handle *h)
     close_and_out:
       __netlink_close (h);
     out:
-#if __ASSUME_NETLINK_SUPPORT == 0
-      __no_netlink_support = 1;
-#endif
       return -1;
     }
   /* Determine the ID the kernel assigned for this netlink connection.
@@ -340,17 +326,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
 
   *ifap = NULL;
 
-  if (! __no_netlink_support && __netlink_open (&nh) < 0)
-    {
-#if __ASSUME_NETLINK_SUPPORT != 0
-      return -1;
-#endif
-    }
-
-#if __ASSUME_NETLINK_SUPPORT == 0
-  if (__no_netlink_support)
-    return fallback_getifaddrs (ifap);
-#endif
+  if (__netlink_open (&nh) < 0)
+    return -1;
 
   /* Tell the kernel that we wish to get a list of all
      active interfaces, collect all data for every interface.  */
@@ -859,11 +836,9 @@ getifaddrs (struct ifaddrs **ifap)
 libc_hidden_def (getifaddrs)
 
 
-#if __ASSUME_NETLINK_SUPPORT != 0
 void
 freeifaddrs (struct ifaddrs *ifa)
 {
   free (ifa);
 }
 libc_hidden_def (freeifaddrs)
-#endif