author | mickeyl <mickeyl> | 2004-04-06 11:53:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-06 11:53:07 (UTC) |
commit | 52b7f68dd9435286a2d0b53fc8649b4323b8af38 (patch) (unidiff) | |
tree | 0ae35404ee9c301f7e96b1e55d3e098d41486dfb /libopie2/opienet | |
parent | d3d2fbab3991b637f50217bbe966484f583fbb19 (diff) | |
download | opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.zip opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.tar.gz opie-52b7f68dd9435286a2d0b53fc8649b4323b8af38.tar.bz2 |
add autodetection for wireless extension version
-rw-r--r-- | libopie2/opienet/onetwork.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index a953296..f5fbe1d 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -33,13 +33,20 @@ | |||
33 | 33 | ||
34 | #if !defined( OPIE_WE_VERSION ) | 34 | #if !defined( OPIE_WE_VERSION ) |
35 | #error Need to define a wireless extension version to build against! | 35 | #warning No wireless extension specified; autodetecting... |
36 | #endif | 36 | #include <linux/version.h> |
37 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) | ||
38 | #define OPIE_WE_VERSION 15 | ||
39 | #else | ||
40 | #define OPIE_WE_VERSION 16 | ||
41 | #endif // LINUX_VERSION_CODE < KERNEL_VERSION(2.4.23) | ||
42 | #endif // !defined( OPIE_WE_VERSION ) | ||
37 | 43 | ||
38 | #if OPIE_WE_VERSION == 15 | 44 | #if OPIE_WE_VERSION == 15 |
39 | #include "wireless.15.h" | 45 | #include "wireless.15.h" |
46 | #warning Using WE V15 | ||
40 | #endif | 47 | #endif |
41 | |||
42 | #if OPIE_WE_VERSION == 16 | 48 | #if OPIE_WE_VERSION == 16 |
43 | #include "wireless.16.h" | 49 | #include "wireless.16.h" |
50 | #warning Using WE V16 | ||
44 | #endif | 51 | #endif |
45 | 52 | ||