tass-belgium / picotcp-bsd

BSD POSIX-compliant socket support for PicoTCP running on any OS.
GNU General Public License v2.0
17 stars 21 forks source link

Can't compile BSD layer anymore #4

Open phalox opened 7 years ago

phalox commented 7 years ago

When trying to compile (for ARM) the BSD layer (through TCD, but also through the makefile in the repo), I bumped into a couple of issues:

in pico_bsd_syscalls.h:

if defined (__socklen_t_defined) && defined (REPLACE_STDCALLS)

was never triggered which caused issues.

I get a couple of multiple defines, which I can't seem to fix: In file included from pico_bsd_sockets.h:328:0, from pico_bsd_sockets.c:12: pico_bsd_syscalls.h:275:23: error: static declaration of 'select' follows non-static declaration static inline int select(int nfds, fd_set readfds, fd_set writefds, fd_set exceptfds, struct timeval timeout) ^ In file included from /usr/local/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/sys/types.h:68:0, from /usr/local/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/sys/signal.h:12, from /usr/local/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/signal.h:6, from pico_bsd_sockets.h:13, from pico_bsd_sockets.c:12: /usr/local/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/sys/select.h:73:5: note: previous declaration of 'select' was here int select P ((int n, fd_set __readfds, fd_set __writefds,

Any clue what's going on? Do I need to set some specific linker flag?

phalox commented 7 years ago

@frederikvs maybe you have a clue?

maximevince commented 7 years ago

Probably some header that includes the "normal" POSIX select() definition was already included. They are now clashing.

Op wo 17 mei 2017 om 10:23 schreef Toon Peters notifications@github.com:

@frederikvs https://github.com/frederikvs maybe you have a clue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tass-belgium/picotcp-bsd/issues/4#issuecomment-302021078, or mute the thread https://github.com/notifications/unsubscribe-auth/ADnsp7DmFai1vl76EsKbL1S1ckTW5ghwks5r6q6JgaJpZM4NdhuH .

ronnyzhao commented 5 years ago

how to compile picotcp-bsd? how to use picotcp-bsd? give a example please! thanks!