Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3 closed enhancement (fixed)

POSIX Semaphores can be used at Solaris

Reported by: dsdiv.moikrug.ru Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.0.x
Keywords: Solaris Cc:
uname -a: SunOS unknown 5.10 Generic_142910-17 i86pc i386 i86pc
nginx -V:

Description (last modified by Maxim Dounin)

Here is Nginx 1.0.5 patch:

--- auto/unix.orig      Fri Aug  5 18:17:24 2011
+++ auto/unix   Fri Aug  5 18:19:38 2011
@@ -620,6 +620,19 @@
 fi


+if [ $ngx_found = no ]; then
+
+    # Solaris has POSIX semaphores in librt
+    ngx_feature="POSIX semaphores in librt"
+    ngx_feature_libs=-lrt
+    . auto/feature
+
+    if [ $ngx_found = yes ]; then
+        CORE_LIBS="$CORE_LIBS -lrt"
+    fi
+fi
+
+
 ngx_feature="struct msghdr.msg_control"
 ngx_feature_name="NGX_HAVE_MSGHDR_MSG_CONTROL"
 ngx_feature_run=no

Change History (3)

comment:1 by Maxim Dounin, 13 years ago

Description: modified (diff)
Status: newaccepted

Thank you, patch looks ok and passes tests here.

comment:2 by Maxim Dounin, 13 years ago

Resolution: fixed
Status: acceptedclosed

Committed as r4004, thanks!

comment:3 by is, 13 years ago

In [4045/nginx]:

Merge of r4004, r4005:

Solaris related fixes:

*) Detect POSIX semaphores in librt on Solaris (ticket #3).

Patch by Denis Ivanov.

*) Lower optimization level for Sun Studio before 12.1.

At least Sun Studio 12 has problems with bit-fields exposed by nginx code
(caught by test suite). They seems to be fixed in Sun Studio 12.1. As a
workaround use "-fast -xalias_level=any" for older versions, it resolves
the problem.

Note: See TracTickets for help on using tickets.