compiling hostapd against madwifi

Joachim Schiele js
Wed Jun 29 06:57:33 PDT 2005


after several hours i can compile some parts of the hostapd but still fail at 
this important part:

root at moon:/usr/src/hostap/hostapd# make
gcc -MMD -O2 -Wall -g -DHOSTAPD_DUMP_STATE -I. -I../driver/modules -I../utils 
-I../wpa_supplicant -I/usr/src/madwifi/  -I/usr/include/ -DCONFIG_IAPP 
-DCONFIG_RSN_PREAUTH -DCONFIG_DRIVER_MADWIFI -DEAP_MD5 -DEAP_TLS -DEAP_PEAP 
-DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_TLV -DEAP_SERVER -DEAP_TLS_FUNCS 
-DPKCS12_FUNCS -DCONFIG_IPV6   -c -o driver_madwifi.o driver_madwifi.c
driver_madwifi.c: In function `madwifi_wireless_event_wireless':
driver_madwifi.c:803: `IW_EV_LCP_LEN' undeclared (first use in this function)
driver_madwifi.c:803: (Each undeclared identifier is reported only once
driver_madwifi.c:803: for each function it appears in.)
driver_madwifi.c:806: dereferencing pointer to incomplete type
driver_madwifi.c:806: dereferencing pointer to incomplete type
driver_madwifi.c:807: dereferencing pointer to incomplete type
driver_madwifi.c:809: dereferencing pointer to incomplete type
driver_madwifi.c:810: `IWEVEXPIRED' undeclared (first use in this function)
driver_madwifi.c:811: dereferencing pointer to incomplete type
driver_madwifi.c:813: `IWEVREGISTERED' undeclared (first use in this function)
driver_madwifi.c:814: dereferencing pointer to incomplete type
driver_madwifi.c:816: `IWEVCUSTOM' undeclared (first use in this function)
driver_madwifi.c:817: `IW_EV_POINT_LEN' undeclared (first use in this 
function)
driver_madwifi.c:818: dereferencing pointer to incomplete type
driver_madwifi.c:820: dereferencing pointer to incomplete type
driver_madwifi.c:823: dereferencing pointer to incomplete type
driver_madwifi.c:824: dereferencing pointer to incomplete type
driver_madwifi.c:811: warning: unreachable code at beginning of switch 
statement
driver_madwifi.c:830: dereferencing pointer to incomplete type
make: *** [driver_madwifi.o] Error 1

the problem seems to be missing include, namely:
CFLAGS += -I/usr/src/linux/include/linux/
 or?!
CFLAGS += -I/usr/include/

the problem is, when i include the files from the kernel, which seems to be 
the only way because the variables like `IW_EV_LCP_LEN' used in the hostapd's 
madwifi part depend on the variables only defined in the kernel include dir.

but after adding the CFLAGS += -I/usr/src/linux/include/linux/
i get the output, at the end of the mail.

can anyone help me? i'm lost ;P

thanks



======== error ==================

root at moon:/usr/src/hostap/hostapd# make
rm -f driver_conf.c
echo '/* THIS FILE AUTOMATICALLY GENERATED, DO NOT EDIT! */' \
                                        > driver_conf.c
echo '#include <stdlib.h>'                      >> driver_conf.c
echo '#include <stdio.h>'                       >> driver_conf.c
echo '#include <sys/types.h>'                   >> driver_conf.c
echo '#include <netinet/in.h>'                  >> driver_conf.c
echo '#include "hostapd.h"'                     >> driver_conf.c
echo '#include "driver.h"'                      >> driver_conf.c
echo "void madwifi_driver_register(void);"      >> driver_conf.c
echo 'void register_drivers(void) {'            >> driver_conf.c
echo "madwifi_driver_register();"               >> driver_conf.c
echo '}'                                        >> driver_conf.c
gcc -MMD -O2 -Wall -g -DHOSTAPD_DUMP_STATE -I. -I../driver/modules -I../utils 
-I../wpa_supplicant -I/usr/src/madwifi/  -I/usr/src/linux/include/linux/ 
-DCONFIG_IAPP -DCONFIG_RSN_PREAUTH -DCONFIG_DRIVER_MADWIFI -DEAP_MD5 
-DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_TLV 
-DEAP_SERVER -DEAP_TLS_FUNCS -DPKCS12_FUNCS -DCONFIG_IPV6   -c -o 
driver_conf.o driver_conf.c
In file included from /usr/include/sys/types.h:215,
                 from /usr/include/stdlib.h:390,
                 from driver_conf.c:2:
/usr/include/sys/select.h:58: warning: `__NFDBITS' redefined
/usr/include/linux/posix_types.h:22: warning: this is the location of the 
previous definition
/usr/include/sys/select.h:60: warning: `__FDMASK' redefined
/usr/include/linux/posix_types.h:34: warning: this is the location of the 
previous definition
/usr/include/sys/select.h:89: warning: `FD_SET' redefined
/usr/src/linux/include/linux/time.h:129: warning: this is the location of the 
previous definition
/usr/include/sys/select.h:90: warning: `FD_CLR' redefined
/usr/src/linux/include/linux/time.h:130: warning: this is the location of the 
previous definition
/usr/include/sys/select.h:91: warning: `FD_ISSET' redefined
/usr/src/linux/include/linux/time.h:131: warning: this is the location of the 
previous definition
/usr/include/sys/select.h:92: warning: `FD_ZERO' redefined
/usr/src/linux/include/linux/time.h:132: warning: this is the location of the 
previous definition
In file included from driver_conf.c:2:
/usr/include/stdlib.h:133: parse error before `__ctype_get_mb_cur_max'
/usr/include/stdlib.h:133: warning: data definition has no type or storage 
class
In file included from /usr/include/bits/types.h:143,
                 from /usr/include/sys/types.h:30,
                 from /usr/include/stdlib.h:390,
                 from driver_conf.c:2:
/usr/include/bits/pthreadtypes.h:50: parse error before `size_t'
/usr/include/bits/pthreadtypes.h:50: warning: no semicolon at end of struct or 
union
/usr/include/bits/pthreadtypes.h:53: parse error before `__stacksize'
/usr/include/bits/pthreadtypes.h:53: warning: data definition has no type or 
storage class
/usr/include/bits/pthreadtypes.h:54: warning: data definition has no type or 
storage class
In file included from /usr/include/sys/types.h:132,
                 from /usr/include/stdlib.h:390,
                 from driver_conf.c:2:
/usr/src/linux/include/linux/time.h:13: parse error before `time_t'
/usr/src/linux/include/linux/time.h:13: warning: no semicolon at end of struct 
or union
/usr/src/linux/include/linux/time.h:15: parse error before `}'
/usr/src/linux/include/linux/time.h:19: parse error before `time_t'
/usr/src/linux/include/linux/time.h:19: warning: no semicolon at end of struct 
or union
/usr/src/linux/include/linux/time.h:20: warning: type defaults to `int' in 
declaration of `tv_usec'
/usr/src/linux/include/linux/time.h:20: warning: data definition has no type 
or storage class
/usr/src/linux/include/linux/time.h:143: field `it_interval' has incomplete 
type
/usr/src/linux/include/linux/time.h:144: field `it_value' has incomplete type
/usr/src/linux/include/linux/time.h:148: field `it_interval' has incomplete 
type
/usr/src/linux/include/linux/time.h:149: field `it_value' has incomplete type
In file included from driver_conf.c:2:
/usr/include/stdlib.h:407: parse error before `size_t'
/usr/include/stdlib.h:436: parse error before `size_t'
/usr/include/stdlib.h:527: parse error before `__size'
/usr/include/stdlib.h:529: parse error before `__nmemb'
/usr/include/stdlib.h:536: parse error before `size_t'
In file included from /usr/include/stdlib.h:546,
                 from driver_conf.c:2:
/usr/include/alloca.h:33: parse error before `__size'
In file included from driver_conf.c:2:
/usr/include/stdlib.h:551: parse error before `__size'
/usr/include/stdlib.h:690: parse error before `size_t'
/usr/include/stdlib.h:694: parse error before `size_t'
/usr/include/stdlib.h:756: parse error before `size_t'
/usr/include/stdlib.h:759: parse error before `size_t'
/usr/include/stdlib.h:763: parse error before `size_t'
/usr/include/stdlib.h:766: parse error before `size_t'
/usr/include/stdlib.h:773: parse error before `size_t'
/usr/include/stdlib.h:776: parse error before `*'
/usr/include/stdlib.h:780: parse error before `wchar_t'
/usr/include/stdlib.h:784: parse error before `mbstowcs'
/usr/include/stdlib.h:784: parse error before `*'
/usr/include/stdlib.h:785: warning: data definition has no type or storage 
class
/usr/include/stdlib.h:787: parse error before `wcstombs'
/usr/include/stdlib.h:788: parse error before `*'
/usr/include/stdlib.h:789: warning: data definition has no type or storage 
class
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:65,
                 from driver_conf.c:3:
/usr/include/gconv.h:72: parse error before `size_t'
/usr/include/gconv.h:85: parse error before `size_t'
/usr/include/gconv.h:94: parse error before `size_t'
/usr/include/gconv.h:170: parse error before `size_t'
/usr/include/gconv.h:170: warning: no semicolon at end of struct or union
/usr/include/gconv.h:173: parse error before `}'
/usr/include/gconv.h:173: warning: data definition has no type or storage 
class
In file included from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:65,
                 from driver_conf.c:3:
/usr/include/_G_config.h:47: field `__cd' has incomplete type
/usr/include/_G_config.h:50: field `__cd' has incomplete type
In file included from /usr/include/stdio.h:65,
                 from driver_conf.c:3:
/usr/include/libio.h:344: parse error before `size_t'
/usr/include/libio.h:353: parse error before `size_t'
/usr/include/libio.h:461: parse error before `_IO_sgetn'
/usr/include/libio.h:461: parse error before `size_t'
/usr/include/libio.h:461: warning: data definition has no type or storage 
class
In file included from driver_conf.c:3:
/usr/include/stdio.h:259: parse error before `size_t'
/usr/include/stdio.h:265: parse error before `size_t'
/usr/include/stdio.h:293: parse error before `size_t'
/usr/include/stdio.h:297: parse error before `size_t'
/usr/include/stdio.h:459: parse error before `fread'
/usr/include/stdio.h:459: parse error before `size_t'
/usr/include/stdio.h:460: warning: data definition has no type or storage 
class
/usr/include/stdio.h:462: parse error before `fwrite'
/usr/include/stdio.h:462: parse error before `size_t'
/usr/include/stdio.h:463: warning: data definition has no type or storage 
class
/usr/include/stdio.h:467: parse error before `fread_unlocked'
/usr/include/stdio.h:467: parse error before `size_t'
/usr/include/stdio.h:468: warning: data definition has no type or storage 
class
/usr/include/stdio.h:469: parse error before `fwrite_unlocked'
/usr/include/stdio.h:469: parse error before `size_t'
/usr/include/stdio.h:470: warning: data definition has no type or storage 
class
In file included from /usr/include/netinet/in.h:212,
                 from driver_conf.c:5:
/usr/include/bits/socket.h:232: parse error before `size_t'
/usr/include/bits/socket.h:232: warning: no semicolon at end of struct or 
union
/usr/include/bits/socket.h:239: parse error before `}'
/usr/include/bits/socket.h: In function `__cmsg_nxthdr':
/usr/include/bits/socket.h:266: `size_t' undeclared (first use in this 
function)
/usr/include/bits/socket.h:266: (Each undeclared identifier is reported only 
once
/usr/include/bits/socket.h:266: for each function it appears in.)
/usr/include/bits/socket.h:266: parse error before `__cmsg'
/usr/include/bits/socket.h:271: dereferencing pointer to incomplete type
/usr/include/bits/socket.h:271: parse error before `~'
/usr/include/bits/socket.h:271: parse error before `)'
/usr/include/bits/socket.h:272: arithmetic on pointer to an incomplete type
/usr/include/bits/socket.h:274: dereferencing pointer to incomplete type
/usr/include/bits/socket.h:274: parse error before `~'
/usr/include/bits/socket.h:275: parse error before `>'
In file included from hostapd.h:4,
                 from driver_conf.c:6:
common.h: At top level:
common.h:151: parse error before `size_t'
common.h:152: parse error before `size_t'
common.h:154: parse error before `size_t'
common.h:156: parse error before `size_t'
common.h:204: parse error before `size_t'
common.h:219: parse error before `size_t'
common.h:235: parse error before `size_t'
common.h:252: parse error before `size_t'
In file included from hostapd.h:5,
                 from driver_conf.c:6:
ap.h:48: parse error before `time_t'
ap.h:48: warning: no semicolon at end of struct or union
ap.h:62: parse error before `wpa_ie_len'
ap.h:62: warning: type defaults to `int' in declaration of `wpa_ie_len'
ap.h:62: warning: data definition has no type or storage class
ap.h:76: parse error before `}'
In file included from hostapd.h:18,
                 from driver_conf.c:6:
config.h:22: parse error before `size_t'
config.h:22: warning: no semicolon at end of struct or union
config.h:25: parse error before `password_len'
config.h:25: warning: type defaults to `int' in declaration of `password_len'
config.h:25: warning: data definition has no type or storage class
config.h:28: parse error before `}'
config.h:70: parse error before `size_t'
config.h:70: warning: no semicolon at end of struct or union
config.h:74: parse error before `eap_req_id_text_len'
config.h:74: warning: type defaults to `int' in declaration of 
`eap_req_id_text_len'
config.h:74: warning: data definition has no type or storage class
config.h:77: parse error before `default_wep_key_len'
config.h:77: warning: type defaults to `int' in declaration of 
`default_wep_key_len'
config.h:77: warning: data definition has no type or storage class
config.h:106: conflicting types for `wpa'
ap.h:68: previous declaration of `wpa'
config.h:141: parse error before `}'
config.h:152: parse error before `size_t'
In file included from driver_conf.c:6:
hostapd.h:99: parse error before `size_t'
hostapd.h:99: warning: no semicolon at end of struct or union
hostapd.h:109: parse error before `michael_mic_failure'
hostapd.h:109: warning: type defaults to `int' in declaration of 
`michael_mic_failure'
hostapd.h:109: warning: data definition has no type or storage class
hostapd.h:119: parse error before `}'
hostapd.h:136: parse error before `size_t'
In file included from driver_conf.c:7:
driver.h:37: parse error before `size_t'
driver.h:40: parse error before `size_t'
driver.h:44: parse error before `size_t'
driver.h:52: parse error before `size_t'
driver.h: In function `hostapd_driver_init':
driver.h:64: dereferencing pointer to incomplete type
driver.h:64: dereferencing pointer to incomplete type
driver.h:66: dereferencing pointer to incomplete type
driver.h: In function `hostapd_driver_deinit':
driver.h:72: dereferencing pointer to incomplete type
driver.h:72: dereferencing pointer to incomplete type
driver.h:74: dereferencing pointer to incomplete type
driver.h:74: dereferencing pointer to incomplete type
driver.h: In function `hostapd_wireless_event_init':
driver.h:80: dereferencing pointer to incomplete type
driver.h:81: dereferencing pointer to incomplete type
driver.h:83: dereferencing pointer to incomplete type
driver.h:83: dereferencing pointer to incomplete type
driver.h: In function `hostapd_wireless_event_deinit':
driver.h:89: dereferencing pointer to incomplete type
driver.h:90: dereferencing pointer to incomplete type
driver.h:92: dereferencing pointer to incomplete type
driver.h:92: dereferencing pointer to incomplete type
driver.h: In function `hostapd_set_ieee8021x':
driver.h:98: dereferencing pointer to incomplete type
driver.h:98: dereferencing pointer to incomplete type
driver.h:100: dereferencing pointer to incomplete type
driver.h:100: dereferencing pointer to incomplete type
driver.h: In function `hostapd_set_privacy':
driver.h:106: dereferencing pointer to incomplete type
driver.h:106: dereferencing pointer to incomplete type
driver.h:108: dereferencing pointer to incomplete type
driver.h:108: dereferencing pointer to incomplete type
driver.h: At top level:
driver.h:113: parse error before `size_t'
driver.h: In function `hostapd_set_encryption':
driver.h:115: `hapd' undeclared (first use in this function)
driver.h:117: `alg' undeclared (first use in this function)
driver.h:117: `addr' undeclared (first use in this function)
driver.h:117: `idx' undeclared (first use in this function)
driver.h:117: `key' undeclared (first use in this function)
driver.h:118: `key_len' undeclared (first use in this function)
driver.h: In function `hostapd_get_seqnum':
driver.h:124: dereferencing pointer to incomplete type
driver.h:124: dereferencing pointer to incomplete type
driver.h:126: dereferencing pointer to incomplete type
driver.h:126: dereferencing pointer to incomplete type
driver.h: In function `hostapd_flush':
driver.h:132: dereferencing pointer to incomplete type
driver.h:132: dereferencing pointer to incomplete type
driver.h:134: dereferencing pointer to incomplete type
driver.h:134: dereferencing pointer to incomplete type
driver.h: At top level:
driver.h:139: parse error before `size_t'
driver.h: In function `hostapd_set_generic_elem':
driver.h:141: `hapd' undeclared (first use in this function)
driver.h:143: `elem' undeclared (first use in this function)
driver.h:143: `elem_len' undeclared (first use in this function)
driver.h: In function `hostapd_read_sta_data':
driver.h:150: dereferencing pointer to incomplete type
driver.h:150: dereferencing pointer to incomplete type
driver.h:152: dereferencing pointer to incomplete type
driver.h:152: dereferencing pointer to incomplete type
driver.h: At top level:
driver.h:157: parse error before `size_t'
driver.h: In function `hostapd_send_eapol':
driver.h:159: `hapd' undeclared (first use in this function)
driver.h:161: `addr' undeclared (first use in this function)
driver.h:161: `data' undeclared (first use in this function)
driver.h:161: `data_len' undeclared (first use in this function)
driver.h:162: `encrypt' undeclared (first use in this function)
driver.h: In function `hostapd_set_sta_authorized':
driver.h:168: dereferencing pointer to incomplete type
driver.h:168: dereferencing pointer to incomplete type
driver.h:170: dereferencing pointer to incomplete type
driver.h:170: dereferencing pointer to incomplete type
driver.h: In function `hostapd_sta_deauth':
driver.h:177: dereferencing pointer to incomplete type
driver.h:177: dereferencing pointer to incomplete type
driver.h:179: dereferencing pointer to incomplete type
driver.h:179: dereferencing pointer to incomplete type
driver.h: In function `hostapd_sta_disassoc':
driver.h:185: dereferencing pointer to incomplete type
driver.h:185: dereferencing pointer to incomplete type
driver.h:187: dereferencing pointer to incomplete type
driver.h:187: dereferencing pointer to incomplete type
driver.h: In function `hostapd_sta_remove':
driver.h:193: dereferencing pointer to incomplete type
driver.h:193: dereferencing pointer to incomplete type
driver.h:195: dereferencing pointer to incomplete type
driver.h:195: dereferencing pointer to incomplete type
driver.h: At top level:
driver.h:199: parse error before `size_t'
driver.h: In function `hostapd_get_ssid':
driver.h:201: `hapd' undeclared (first use in this function)
driver.h:203: `buf' undeclared (first use in this function)
driver.h:203: `len' undeclared (first use in this function)
driver.h: At top level:
driver.h:207: parse error before `size_t'
driver.h: In function `hostapd_set_ssid':
driver.h:209: `hapd' undeclared (first use in this function)
driver.h:211: `buf' undeclared (first use in this function)
driver.h:211: `len' undeclared (first use in this function)
driver.h: At top level:
driver.h:215: parse error before `size_t'
driver.h: In function `hostapd_send_mgmt_frame':
driver.h:218: `hapd' undeclared (first use in this function)
driver.h:220: `msg' undeclared (first use in this function)
driver.h:220: `len' undeclared (first use in this function)
driver.h:220: `flags' undeclared (first use in this function)
driver.h: In function `hostapd_set_assoc_ap':
driver.h:226: dereferencing pointer to incomplete type
driver.h:226: dereferencing pointer to incomplete type
driver.h:228: dereferencing pointer to incomplete type
driver.h:228: dereferencing pointer to incomplete type
driver.h: In function `hostapd_sta_add':
driver.h:235: dereferencing pointer to incomplete type
driver.h:235: dereferencing pointer to incomplete type
driver.h:237: dereferencing pointer to incomplete type
driver.h:237: dereferencing pointer to incomplete type
driver.h: In function `hostapd_get_inact_sec':
driver.h:244: dereferencing pointer to incomplete type
driver.h:244: dereferencing pointer to incomplete type
driver.h:246: dereferencing pointer to incomplete type
driver.h:246: dereferencing pointer to incomplete type
driver.h: In function `hostapd_sta_clear_stats':
driver.h:257: dereferencing pointer to incomplete type
driver.h:257: dereferencing pointer to incomplete type
driver.h:259: dereferencing pointer to incomplete type
driver.h:259: dereferencing pointer to incomplete type
make: *** [driver_conf.o] Error 1
root at moon:/usr/src/hostap/hostapd#            

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20050629/dac7679f/attachment.pgp 



More information about the Hostap mailing list