From telackey at lacklustremedia.com Fri Mar 31 15:57:37 2017 From: telackey at lacklustremedia.com (Thomas E. Lackey) Date: Fri, 31 Mar 2017 20:57:37 +0000 Subject: [netrek-dev] Patch for FreeBSD Message-ID: <7B7F0680CB055E4183BC55AAFC44B75D01BDC4DB03@iola.redbudcomputer.local> I recently built 2.19.0 on FreeBSD 11 ARMv6 (rpi2). Building with gcc (rather than cc) was mostly uneventful, but I did have to add a few #includes for (patch attached). Without them, the build would fail with: newstartd.c: In function 'main': newstartd.c:288:26: error: storage size of 'addr' isn't known struct sockaddr_in addr; ^ newstartd.c:288:26: warning: unused variable 'addr' [-Wunused-variable] newstartd.c: At top level: newstartd.c:362:34: warning: 'struct sockaddr_in' declared inside parameter list static int get_connection(struct sockaddr_in *peer) ^ newstartd.c:362:34: warning: its scope is only this definition or declaration, which is probably not what you want newstartd.c: In function 'get_connection': newstartd.c:364:22: error: storage size of 'addr' isn't known struct sockaddr_in addr; ^ newstartd.c:364:22: warning: unused variable 'addr' [-Wunused-variable] newstartd.c: In function 'read_portfile': newstartd.c:725:19: error: 'INADDR_ANY' undeclared (first use in this function) prog[i].addr = INADDR_ANY; ^ newstartd.c:725:19: note: each undeclared identifier is reported only once for each function it appears in *** Error code 1 Stop. make[1]: stopped in /home/freebsd/tmp/netrek-git/netrek-server/newstartd *** Error code 1 Stop. make: stopped in /home/freebsd/tmp/netrek-git/netrek-server I did not protect the new includes with an #ifdef since is included freely elsewhere. I do not know how many people will want to build on FreeBSD rather than Linux, and especially on a Pi, where most people will be running Debian/Raspbian, but overall the Pi seems a good target for a server like this and compatibility with BSD a win as well. Cheers, -- Thomas E Lackey (SQUID of old) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 868 bytes Desc: patch.diff URL: From quozl at us.netrek.org Fri Mar 31 16:52:04 2017 From: quozl at us.netrek.org (James Cameron) Date: Sat, 1 Apr 2017 08:52:04 +1100 Subject: [netrek-dev] Patch for FreeBSD In-Reply-To: <7B7F0680CB055E4183BC55AAFC44B75D01BDC4DB03@iola.redbudcomputer.local> References: <7B7F0680CB055E4183BC55AAFC44B75D01BDC4DB03@iola.redbudcomputer.local> Message-ID: <20170331215204.GG5270@us.netrek.org> Thanks, recast as a git commit and merged; https://github.com/quozl/netrek-server/commit/489c4c3e5c0e4084fadd5dfc56bd8df9de43c882 -- James Cameron http://quozl.netrek.org/