Solaris 10 (x86) does not have strsep (used in sql/

Bug #526863 reported by gsyoungblood
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona patches

Bug Description

Compiling on Solaris 10 x86 using gcc fails at sql/ due to lack of strsep on Solaris.

gmake[3]: Entering directory `/home/gyoungbl/mysql-percona/mysql-5.1.43-percona-gcc/sql'
/usr/sfw/bin/gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-5.1.43-percona\"" -DMYSQL_DATADIR="\"/usr/local/mysql-5.1.43-percona/data\"" -DSHAREDIR="\"/usr/local/mysql-5.1.43-percona/share/mysql\"" -DPLUGINDIR="\"/usr/local/mysql-5.1.43-percona/lib/mysql/plugin\"" -DHAVE_EVENT_SCHEDULER -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I../regex -I. -m32 -I/opt/zz/include -I /usr/sfw/include -I/usr/sfw/include/openssl -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -MT sql_show.o -MD -MP -MF .deps/sql_show.Tpo -c -o sql_show.o In function `bool show_status_array(THD*, const char*, SHOW_VAR*, enum_var_type, system_status_var*, const char*, TABLE*, bool, COND*)': warning: cast from pointer to integer of different size In function `int fill_schema_table_stats(THD*, TABLE_LIST*, COND*)': error: `strsep' undeclared (first use this function) error: (Each undeclared identifier is reported only once for each function it appears in.) In function `int fill_schema_index_stats(THD*, TABLE_LIST*, COND*)': error: `strsep' undeclared (first use this function)
gmake[3]: *** [sql_show.o] Error 1
gmake[3]: Leaving directory `/home/gyoungbl/mysql-percona/mysql-5.1.43-percona-gcc/sql'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/gyoungbl/mysql-percona/mysql-5.1.43-percona-gcc/sql'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/gyoungbl/mysql-percona/mysql-5.1.43-percona-gcc/sql'
gmake: *** [all-recursive] Error 1

Results from google indicate that strsep does not exist on Solaris.

I am chasing a couple of options, if I get something to work I'll post a follow-up with the solution. The most promising seems to be to provide a replacement strsep.

Revision history for this message
gsyoungblood (greg-tcscs) wrote :

For clarification:

This appears a problem with Solaris 10. It seems OpenSolaris probably has it now (see

Revision history for this message
gsyoungblood (greg-tcscs) wrote :

The attached patch allows Solaris 10 to compile 5.1.43 w/the percona patches.

Instead of putting the function in the file as this patch does, I'd suggest creating a compatibility file and putting functions like these in there. I did not have the time to do that, but this at least allows it to compile. Will be testing later tonight.

Note: The fix from is also required to compile.

Revision history for this message
Stewart Smith (stewart) wrote :


Development has moved from percona-patches over to Percona Server. We support Solaris with Percona Server and produce binaries for it. I also see some compatibility code in our latest source trees. I am therefor going to close this bug as Invalid as I don't think it applies to current Percona Server. If you can reproduce however, please reopen against percona-server project (click "also affects project" above) and we can work on fixing it.

Stewart Smith
Director of Server Development

Changed in percona-patches:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.