Hi guys, I am now hitting a similar problem on armel. I am cross-compiling "dnsmasq" Glibc strace: ---snip--- socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 Musl strace: socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0 setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 setsockopt(5, SOL_SOCKET, *0xf /* SO_??? */*, [1], 4) = -1 ENOPROTOOPT (Protocol not available) Regards Paul On Mon, Nov 5, 2012 at 7:31 PM, Rich Felker wrote: > On Mon, Nov 05, 2012 at 07:27:44PM +0200, Paul Schutte wrote: > > Thanks for the reply. > > > > I suspected something like you mention and therefore I made sure that I > > installed the correct kernel headers before I compiled musl or any of the > > other software. > > Kernel headers are completely irrelevant; they're not used anywhere. > nsz's analysis is right. I have a patch I'm about to commit. In case > you'd like to try it directly without using git, I'm attaching it > here. > > There may be more fixes still needed. MIPS has A LOT of gratuitous > differences in constant definitions and I thought I'd caught all of > them before, but apparently some slipped through. The fcntl part of > the patch has been tested and seems correct. The socket parts should > be right, but they're untested; I'm working on a test for them now. > > Rich >