Dan McDonald <[EMAIL PROTECTED]> writes: > Before putting back a user-contributed fix to bug 6442434 (Solaris > should have AF_LOCAL/PF_LOCAL/AF_FILE/PF_FILE as synonyms for > AF_UNIX/PF_UNIX) - I was wondering if there were people who could > install the two replacement header files on their recent-vintage > OpenSolaris boxes, and compile some of their favorite > packages/sources? > > An example bug we've found internally is that some apps have: > > struct sockaddr_un sun; > > which is bad on OpenSolaris, given "sun" is a preprocessor symbol that > is set to '1'. You might not have seen this before because often this > code isn't compiled unless AF_LOCAL is specified (because AF_UNIX is > apparently too oppressive or something). > > The replacement header files both go in /usr/include/sys, and are > located at: > > http://cr.opensolaris.org/~danmcd/af_local/raw_files/new/usr/src/uts/common/sys/socket.h > http://cr.opensolaris.org/~danmcd/af_local/raw_files/new/usr/src/uts/common/sys/un.h > > And if you want to see the whole ON webrev, check it out at: > > http://cr.opensolaris.org/~danmcd/af_local/
I just made a whole-root zone (SXCE b96), dropped the new headers in place and built a bunch of pkgs with pkgbuild. Results: package | status | details ---------------------------------+-------------+------------------------------- alpine | PASSED | bitlbee | PASSED | cvs | PASSED | dovecot | PASSED | emacs | PASSED | exim | PASSED | git | PASSED | mediatomb | PASSED | openssh | PASSED | rsync | PASSED | screen | PASSED | socat | PASSED | star | PASSED | synergy | PASSED | vim | PASSED | w3m | PASSED | x11vnc | PASSED | All built with the shipped gcc, since I also need to be able to compile them on vanilla Solaris 10. Mind you, the only significant mention of AF_LOCAL in the code for all those is in emacs (src/process.c), which deals with this itself: > #if defined (HAVE_SYS_UN_H) && !defined (NO_SOCKETS_IN_FILE_SYSTEM) > #if !defined (AF_LOCAL) && defined (AF_UNIX) > #define AF_LOCAL AF_UNIX > #endif > #ifdef AF_LOCAL > #define HAVE_LOCAL_SOCKETS > #include <sys/un.h> > #endif > #endif > #endif /* HAVE_SOCKETS */ I've also tried a current CVS emacs without issues The program I recently had issues with is the Squeak smalltalk VM. To build it in the past I've had to patch to s/AF_LOCAL/AF_UNIX/g. This was no longer needed with these headers (as expected). I still need to patch it for other issues, including the fact that "sun" is defined in the preprocessor. I'm not sure where that comes from, or the best way to get rid of it. The command line for the file that has problems with "sun" looks like this: gcc -g -O2 -fomit-frame-pointer \ -DLSB_FIRST=1 -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN \ -I/export/home/boyd/squeak/squeak-svn/bld \ -I/export/home/boyd/squeak/squeak-svn/platforms/unix/vm \ -I/export/home/boyd/squeak/squeak-svn/platforms/Cross/vm \ -I/export/home/boyd/squeak/squeak-svn/platforms/unix/src/vm \ -I/export/home/boyd/squeak/squeak-svn/platforms/Cross/plugins/SocketPlugin \ -c -o sqUnixSocket.o \ /export/home/boyd/squeak/squeak-svn/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c Maybe there's something I should be passing in CFLAGS to get rid of the definition of "sun"? Boyd _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code