[SERVER-9832] Missing PF_LOCAL symbol in Solaris 10 Created: 31/May/13  Updated: 11/Jul/16  Resolved: 05/Jun/13

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.5.0
Fix Version/s: 2.4.6, 2.5.1

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 10


Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: Solaris
Participants:

 Description   

The header files for Solaris 10 do not declare the symbol PF_LOCAL, used to specify Unix domain sockets as the "protocol family" for socket calls.

PF_LOCAL is the POSIX name for what BSD Unix called PF_UNIX. According to http://www.gnu.org/software/libc/manual/html_node/Address-Formats.html,

Although AF_LOCAL is mandated by POSIX.1g, AF_UNIX is portable to more systems ... (The same is true for PF_UNIX vs. PF_LOCAL)."

I verified that using PF_UNIX works around the problem on Solaris 10.

Suggest backport to 2.4 branch (optionally 2.2 as well).



 Comments   
Comment by auto [ 17/Jul/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9832 Use PF_UNIX symbol instead of PF_LOCAL

PF_LOCAL is the POSIX name for the Unix domain sockets protocol family,
while PF_UNIX is the name that was used by BSD. Solaris 10 declares
PF_UNIX but not PF_LOCAL, so use that symbol instead.
Branch: v2.4
https://github.com/mongodb/mongo/commit/09feca0ac1756cf079e525bbbfa128ff8db60426

Comment by auto [ 05/Jun/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9832 Use PF_UNIX symbol instead of PF_LOCAL

PF_LOCAL is the POSIX name for the Unix domain sockets protocol family,
while PF_UNIX is the name that was used by BSD. Solaris 10 declares
PF_UNIX but not PF_LOCAL, so use that symbol instead.
Branch: master
https://github.com/mongodb/mongo/commit/c4378a6f860a68117b2c879944b3fe39ab6b3e75

Comment by Tad Marshall [ 31/May/13 ]

This only affects the unit test src/mongo/util/net/sock_test.cpp; the PF_LOCAL symbol is not currently used anywhere else in the codebase.

Generated at Thu Feb 08 03:21:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.