[ZBX-7013] non-standard strndup is used in dbupgrade.c file, DBpatch_2010101 function Created: 2013 Sep 16 Updated: 2017 May 30 Resolved: 2013 Sep 19 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.1.4 |
Fix Version/s: | 2.2.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | Omid Mehdizadeh | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Solaris x86, Sun Studio 12 |
Description |
The strndup function is used in src/libs/zbxdbupgrade/dbupgrade.c in DBpatch_2010101 function. It is GNU function, not standard, so can't compile server and link zabbix server with SunStudio CC and guess same for other compilers except gcc. I fix it by the following code. but couldn't be a good choice. #Fix strndup issue on dbuphgrade.c " echo "$STRNDUP_FUNC" >> src/libs/zbxdbupgrade/dbupgrade.c sed '/static void parse_db_monitor_item_params.*/ i\ |
Comments |
Comment by Igors Homjakovs (Inactive) [ 2013 Sep 18 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7013 |
Comment by Alexander Vladishev [ 2013 Sep 18 ] |
(1) Please remove incorrectly created svn://svn.zabbix.com/branches/dev/ZBX-7013/trunk branch. igorsh RESOLVED in r38645 sasha CLOSED |
Comment by Alexander Vladishev [ 2013 Sep 18 ] |
(2) "size" and "offset" variables should be renamed to "param_alloc" and "param_offset" for consistency. igorsh RESOLVED in r38646 sasha CLOSED |
Comment by Alexander Vladishev [ 2013 Sep 19 ] |
(3) Please review my fix in r38618. igorsh Minor code fix in r38648 RESOLVED sasha Thanks! CLOSED |
Comment by Alexander Vladishev [ 2013 Sep 19 ] |
Successfully tested! |
Comment by Igors Homjakovs (Inactive) [ 2013 Sep 23 ] |
Fixed in trunk r38732 |