From: Roy Marples Date: Mon, 23 Feb 2009 13:40:24 +0000 (+0000) Subject: Try a new tactic to compile with old broken linux kernel headers. X-Git-Tag: v5.0.0~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1dde3c8b44469a6d4370a41d30ea1de014d678f;p=thirdparty%2Fdhcpcd.git Try a new tactic to compile with old broken linux kernel headers. --- diff --git a/if-linux.c b/if-linux.c index c46be587..26f08c07 100644 --- a/if-linux.c +++ b/if-linux.c @@ -40,7 +40,6 @@ #include #include -#include #include #include @@ -52,8 +51,13 @@ #include /* Support older kernels */ -#ifndef IFLA_WIRELESS -# define IFLA_WIRELSSS (IFLFA_MASTER + 1) +#ifdef IFLA_WIRELESS +# ifndef __user +# define __user +# endif +# include +#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