Subject: Using strtok instead of strsep in environments which does not have strsep Origin: softflowd-0.9.9-2-gcdf7ae1 Upstream-Author: Hitoshi Irino Date: Sun Sep 23 03:43:48 2012 +0900 --- a/configure.ac +++ b/configure.ac @@ -87,7 +87,7 @@ AC_SEARCH_LIBS(socket, socket) AC_CHECK_LIB(pcap, pcap_open_live) -AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat) +AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat strsep) AC_CHECK_TYPES([u_int64_t, int64_t, uint64_t, u_int32_t, int32_t, uint32_t]) AC_CHECK_TYPES([u_int16_t, int16_t, uint16_t, u_int8_t, int8_t, uint8_t]) --- a/softflowd.c +++ b/softflowd.c @@ -1736,7 +1736,11 @@ usage(); exit(1); } +#if defined(HAVE_STRSEP) dev = strsep(&optarg, ":"); +#else /* defined(HAVE_STRSEP) */ + dev = strtok(optarg, ":"); +#endif /* defined(HAVE_STRSEP) */ if (optarg != NULL) { if_index = (u_int16_t) atoi(dev); dev = optarg;