Hello, I'm having a problem in my project of porting LwIP to the Hurd. Since the stack and the user program run in diferent processes, they are using different versions of the usual socket macros like MSG_PEEK, SOCK_STREAM, etc.
For instance, when calling recv() with the MSG_PEEK flag, the user program is taking it from sys/socket.h[1] and sends its value (0x02) through an IPC message. When the lwip server receives the message, compares this flag with its version in lwip/socket.h[2] and determines it is MSG_WAITALL. I solved this by simply including <sys/socket.h> in my cc.h and removing all the duplicated macros and structures in lwip/sockets, but I wonder if is there a better way to to this. Anyone faced this problem before? I could add a check for a new macro, say, LWIP_SYS_SOCKET in lwip/sockets.h and define those flags only if this macro is not set. What do you think? Thanks for your comments. ------- [1]http://git.savannah.gnu.org/cgit/hurd/glibc.git/tree/sysdeps/mach/hurd/bits/socket.h?h=tschwinge/Roger_Whittaker#n176 [2]http://git.savannah.nongnu.org/cgit/lwip.git/tree/src/include/lwip/sockets.h#n257 _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
