Hi Kimmo!
Is struct sockaddr_storage protected by a macro? It should be declared in sys/socket.h. How about struct addrinfo in netdb.h? Did you check the manual pages?
In /usr/include/sys/socket_impl.h, the definition of sockaddr_storage is protected by
#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
This patch
--- Makefile.bak Fri Sep 4 13:52:31 2015
+++ Makefile Thu Sep 10 09:13:04 2015
@@ -41,7 +41,7 @@
PLIST_VARS+= terminfo
.if ${OPSYS} == "SunOS"
-CPPFLAGS+= -D_XOPEN_SOURCE=500
+CPPFLAGS+= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
. if ${CURSES_DEFAULT} == "curses"
INSTALLATION_DIRS+= share/lib/terminfo
PLIST.terminfo= yes
makes misc/screen compile for me. According to the examples in
http://docs.oracle.com/cd/E19120-01/open.solaris/817-4415/sockets-85885/index.html
(for OpenSolaris???) or here
http://docs.oracle.com/cd/E36784_01/html/E36861/sockets-27.html
this seems to be the correct define to use in application code.
Jörn
--
Jörn Clausen
Plattformen & Serverdienste
Hochschulrechenzentrum
Universität Bielefeld
Universitätsstraße 25
33615 Bielefeld
Telefon: +49 521 106-12601
E-Mail: joern.clausen%uni-bielefeld.de@localhost
http://www.uni-bielefeld.de/hrz