compiling wpa_supplicant with mingw (Packet32.h missing)

Ingo Bente ingo.bente
Sun Jul 27 23:52:37 PDT 2008


> On Sun, 2008-07-27 at 23:20 +0200, Sergio wrote:
>> Dan Williams escribi?:
>>> On Sun, 2008-07-27 at 21:33 +0200, Sergio wrote:
>>>   
>>>> Sergio escribi?:
>>>>     
>>>>> Hi, can anybody suggest me something?
>>>>>
>>>>> I'm trying to compile wpa_supplicant 0.6.3 under debian etch to use
>>>>> under windows. My .config file:
>>>>>
>>>>> CONFIG_IEEE8021X_EAPOL=y
>>>>> CONFIG_EAP_TLS=y
>>>>> CONFIG_SMARTCARD=y
>>>>> #CONFIG_PCSC=y
>>>>> CONFIG_CTRL_IFACE=y
>>>>> CONFIG_OS=win32
>>>>> CONFIG_L2_PACKET=winpcap
>>>>>
>>>>> #CAMBIA TIPO DE PAQUETES EN CAPA 2,PARA LINUX, si es que no se puso lo
>>>>> de antes
>>>>> #CONFIG_DNET_PCAP=y
>>>>> CONFIG_TLS=openssl
>>>>> CFLAGS += -I/usr/local/ssl/include
>>>>> LIBS += -L/usr/local/ssl/include/lib
>>>>>
>>>>> # Driver interface for Windows NDIS
>>>>> CONFIG_DRIVER_NDIS=y
>>>>> CFLAGS += -I/usr/i586-mingw32msvc/include
>>>>> LIBS += -L/usr/i586-mingw32msvc/lib
>>>>>
>>>>> # For native build using mingw
>>>>> CONFIG_NATIVE_WINDOWS=y
>>>>> # Additional directories for cross-compilation on Linux host for mingw
>>>>> target
>>>>> CFLAGS += -I/usr/i586-mingw32msvc/include/ddk
>>>>> LIBS += -L/usr/i586-mingw32msvc/lib
>>>>> CC=i586-mingw32msvc-gcc
>>>>>
>>>>> when I execute make, some options compile ok, but when it try to compile
>>>>> ndis driver, the output says:
>>>>>
>>>>> ../src/drivers/driver_ndis.c:26:22: warning: Packet32.h: No existe el
>>>>> fichero o el directorio <--------(FILE DOESN'T EXISTS)
>>>>> In file included from ../src/drivers/driver_ndis.c:40:
>>>>>
>>>>> Then I try to search header file:
>>>>>
>>>>>
>>>>> portatil:/archivos/programas/wpa_supplicant-0.6.3/wpa_supplicant# find /
>>>>> -name Packet32.h
>>>>> portatil:/archivos/programas/wpa_supplicant-0.6.3/wpa_supplicant#
>>>>>
>>>>> there aren't any Packet32.h file.....
>>>>>
>>>>> I have libpcap0.8 && libpcap0.8-dev installed
>>>>>
>>>>> can anybody help me? my .config seems ok.
>>>>>
>>>>> Thanks!
>>>>>
>>>>>   
>>>>>       
>>>> including winpcap-devel and compiling.............
>>>> .....VER_NDIS -DEAP_TLS -DIEEE8021X_EAPOL -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL
>>>> -DCONFIG_SMARTCARD -DINTERNAL_SHA256 -DCONFIG_CTRL_IFACE
>>>> -DCONFIG_CTRL_IFACE_NAMED_PIPE -DCONFIG_NATIVE_WINDOWS
>>>> -DCONFIG_NO_FIPS186_2_PRF -DCONFIG_NO_T_PRF -c
>>>> -o ../src/drivers/driver_ndis_.o ../src/drivers/driver_ndis_.c
>>>> ../src/drivers/driver_ndis_.c: In function
>>>> `wpa_driver_ndis_event_pipe_cb':
>>>> ../src/drivers/driver_ndis_.c:98: error: structure has no member named
>>>> `event_avail'
>>>> ../src/drivers/driver_ndis_.c:99: error: structure has no member named
>>>> `events_pipe'
>>>> make: *** [../src/drivers/driver_ndis_.o] Error 1
>>>>     
>>> Add
>>>
>>> CONFIG_NDIS_EVENTS_INTEGRATED=y
>>>
>>> to your build config.  Not sure how the bits in driver_ndis.c are
>>> getting the defined even though its not in the build config though.
>>>
>>> Dan
>>>   
>> If i put this option i need wbemidl.h header file to compile. I've read 
>> in some .config examples that with this option you need to install WMI 
>> (under windows!!) to link with it libraries. That sounds a little strange.
> 
> (lets keep this on-list so others can help)
> 
> Ok, then the bug is that somehow, the stuff in driver_ndis.c is getting
> that defined when it shouldn't be.  The header (driver_ndis.h) is
> correctly not using it, but driver_ndis.c is.
> 
> (everyone) I'm not an expert on the makefile magic that hostap is using
> here, but is the "driver_ndis_.c" (note the trailing underscore) part of
> the build magic or is that just wrong?
> 
> Dan
> 

Hi,

afaik that's a missing #ifdef in "driver_ndis_.c". The bug can be fixed
as described on http://www.codealias.info/technotes/wpaw32compile :

+#ifdef CONFIG_NDIS_EVENTS_INTEGRATED

   void wpa_driver_ndis_event_pipe_cb(void *eloop_data, void *user_data)
   {
  @@ -106,3 +107,5 @@
                             (int) GetLastError());
          }
   }
+
+#endif

Ingo




More information about the Hostap mailing list