Porting to OS/2: Case #4 socklen_t and macros for shutdown()
socklen_t When porting network stuffs, you'll often encounter the complains of a compiler about socklen_t. Because OS/2 kLIBC does not define it. So we should define it by ourselves. It's simple. Just use typedef or #define. Colored By Color Scripter ™ 1 typedef int socklen_t; Colored By Color Scripter ™ 1 #define socklen_t int Or, you can use -D option of gcc. gcc some_options -Dsocklen_t=int some_options Macros for shutdown() shutdown() uses macros for its argument. Unfortunately, however, OS/2 kLIBC does not have them. They are SHUT_RD, SHUT_WR, and SHUT_RDWR. And they correspond to 0, 1 and 2, respectively. So use #define. Colored By Color Scripter ™ 1 2 3 #define SHUT_RD 0 #define SHUT_WR 1 #define SHUT_RDWR 2