OSSP CVS Repository

ossp - Check-in [1668]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1668
Date: 2002-Jan-27 21:42:29 (local)
2002-Jan-27 20:42:29 (UTC)
User:rse
Branch:
Comment: Linux does not have SA_OPTION_REUSEPORT, so use this optionally only.
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.c      1.51 -> 1.52     6 inserted, 1 deleted

ossp-pkg/sa/sa.c 1.51 -> 1.52

--- sa.c 2002/01/02 13:53:11     1.51
+++ sa.c 2002/01/27 20:42:29     1.52
@@ -1159,7 +1159,10 @@
             break;
         }
         case SA_OPTION_REUSEADDR:
-        case SA_OPTION_REUSEPORT: {
+#ifdef SA_OPTION_REUSEPORT
+        case SA_OPTION_REUSEPORT: 
+#endif
+        {
             /* enable/disable reusability of binding to address or port */
             int mode = ((int)va_arg(ap, int) ? 1 : 0);
             int flag;
@@ -1169,7 +1172,9 @@
             }
             switch (id) {
                 case SA_OPTION_REUSEADDR: flag = SO_REUSEADDR; break;
+#ifdef SA_OPTION_REUSEPORT
                 case SA_OPTION_REUSEPORT: flag = SO_REUSEPORT; break;
+#endif
                 default: flag = 0; break;
             }
             if (setsockopt(sa->fdSocket, SOL_SOCKET, flag, 

CVSTrac 2.0.1