I have also been unable to compile the WiFi shield examples for the Due , getting the same error. I installed the Wifi library through the "add library" menu item.
The failure to compile for the Due appears to be conflicting typedef's for u_short:
\arduino-1.5.1r2\hardware\tools\g++_arm_none_eabi\arm-none-eabi\include\sys\types.h:
Line 93: typedef unsigned short u_short
\Arduino\libraries\WiFi\utility\socket.h:
Line 71: typedef uint16 u_short; /**< 16-bit value */