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,
|
|