NETX DUO BSD Sockets for RX Processor

I am trying to get BSD style sockets working with Netx Duo on the R5F572NN processor.

I am using the GNU compiler.

I cannot find any specific files for the RX processor, so have obtained the Microsoft nxd_bsd.c and nxd_bsd.h files to add to my project.

However, these give errors when compiled.

Conflicting types for "fd_set"

Conflicting types for "select"

Redefinition of 'struct timeval'

select uses both fd_set and timeval so is likely impacted by these two conflicts.

INT select(INT nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);

I want to make sure any fix is valid rather than a hack.

Has anyone got the BSD sockets working for Netx Duo and RX processor?