strsep is not portable (not available on Solaris) so add our own version
to mainconfig.c.

Regards
-steve
Index: mainconfig.c
===================================================================
--- mainconfig.c	(revision 2207)
+++ mainconfig.c	(working copy)
@@ -251,6 +251,35 @@
 	return (-1);
 }
 
+static char * strsep_cs(char **stringp, const char *delim)
+{
+	char *s;
+	const char *spanp;
+	int c, sc;
+	char *tok;
+
+	if ((s = *stringp) == NULL) {
+		return (NULL);
+	}
+
+	for (tok = s; ; ) {
+		c = *s++;
+		spanp = delim;
+		do {
+			if ((sc = *spanp++) == c) {
+				if (c == 0) {
+					s = NULL;
+				}
+				else {
+					s[-1] = 0;
+				}
+				*stringp = s;
+				return (tok);
+			}
+		} while (sc != 0);
+	}
+}
+
 static int corosync_main_config_set (
 	struct objdb_iface_ver0 *objdb,
 	hdb_handle_t object_handle,
@@ -466,7 +495,7 @@
 			goto parse_error;
 		}
 
-		while ((token = strsep(&temp, "|")) != NULL) {
+		while ((token = strsep_cs(&temp, "|")) != NULL) {
 			int val;
 
 			val = logsys_tag_id_get(token);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to