diff options
| author | Roy Marples <roy@marples.name> | 2009-02-23 13:40:24 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-02-23 13:40:24 +0000 |
| commit | d1dde3c8b44469a6d4370a41d30ea1de014d678f (patch) | |
| tree | be44b97df39a0b5d65b85606b859e5b0b65a7246 | |
| parent | cf6757c4d5365c4271b5332ee496e3d0a29719cb (diff) | |
| download | dhcpcd-d1dde3c8b44469a6d4370a41d30ea1de014d678f.tar.xz | |
Try a new tactic to compile with old broken linux kernel headers.
| -rw-r--r-- | if-linux.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -40,7 +40,6 @@ #include <linux/netlink.h> #include <linux/rtnetlink.h> -#include <linux/wireless.h> #include <errno.h> #include <ctype.h> @@ -52,8 +51,13 @@ #include <unistd.h> /* Support older kernels */ -#ifndef IFLA_WIRELESS -# define IFLA_WIRELSSS (IFLFA_MASTER + 1) +#ifdef IFLA_WIRELESS +# ifndef __user +# define __user +# endif +# include <wireless.h> +#else +# define IFLA_WIRELESS (IFLA_MASTER + 1) #endif #include "config.h" @@ -74,6 +78,7 @@ static struct sockaddr_nl sock_nl; int getifssid(const char *ifname, char *ssid) { +#ifdef SIOCGIWESSID int s, retval; struct iwreq iwr; @@ -90,6 +95,11 @@ getifssid(const char *ifname, char *ssid) retval = -1; close(s); return retval; +#else + /* Stop gcc warning about unused paramters */ + ifname = ssid; + return -1; +#endif } static int |
