WiFi header include problem

Hello, any help will be appreciated...

I followed the tutorial on the page http://arduino.cc/en/Tutorial/WiFiSendReceiveUDPString

Then I noticed that I don't have WiFiUdp.h header in my WiFi library.

After that I downloaded new WiFi library which contained that header from https://github.com/arduino/Arduino/tree/master/libraries/WiFi

I get the following error when trying to compile for my arduino due with wifi shield:

In file included from c:\users\edit-piaf\desktop\arduino\arduino-1.5.1r2\hardware\tools\g++_arm_none_eabi\bin../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/stdio.h:46,
from C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi/utility/debug.h:13,
from C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi\WiFiClient.cpp:6:
c:\users\edit-piaf\desktop\arduino\arduino-1.5.1r2\hardware\tools\g++_arm_none_eabi\bin../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/types.h:93: error: conflicting declaration 'typedef short unsigned int u_short'
C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi\utility/socket.h:71: error: 'u_short' has a previous declaration as 'typedef uint16 u_short'
C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi\WiFiClient.cpp: In member function 'virtual int WiFiClient::read(uint8_t*, size_t)':
C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi\WiFiClient.cpp:107: error: no matching function for call to 'ServerDrv::getDataBuf(uint8_t&, uint8_t*&, size_t*)'
C:\Users\Edit-Piaf\Desktop\Arduino\arduino-1.5.1r2\libraries\WiFi\utility/server_drv.h:26: note: candidates are: static bool ServerDrv::getDataBuf(uint8_t, uint8_t*, uint16_t*)

Thank you in advance.


It would be easier to answer your question if you were to include your code.

Hi Acaine,

Full code I'm compiling is listed on the following page:

Thank you.


Which Arduino are you using? If you do not have a Due, you should not (yet) be using 1.5.n.

Hi Paul,

I have a confession to make.

I'm using Arduino Due board, but for the lack of UDP header in 1.5.1 I copied the wifi library from the 1.0.5, so that is the problem.

But it seems to be just a type declaration, can it be fixed?