View Issue Details

IDProjectCategoryView StatusLast Update
0001128bareos-coreapipublic2023-07-19 11:40
Reporterrjung Assigned Tobruno-at-bareos  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformSolaris10OSSolarisOS Version10
Product Version18.2.6 
Summary0001128: Compilation error due to existing symbol round()
DescriptionActually version is 18.4.1 but that doesn't exist in the mantis version dropdown.

File core/src/lib/bsnprintf.cc defines a function round() which leads to a compilation error on Solaris 10 Sparc, because that symbol already exists. Since the new round(9 is static, obne can rename it, eg. to roundit. The following patch helps:

--- core/src/lib/bsnprintf.cc Fri Sep 28 10:30:36 2018
+++ core/src/lib/bsnprintf.cc Sun Nov 3 18:07:19 2019
@@ -618,7 +618,7 @@
    return result;
 }

-static int64_t round(LDOUBLE value)
+static int64_t roundit(LDOUBLE value)
 {
    int64_t intpart;

@@ -685,7 +685,7 @@
    /* We "cheat" by converting the fractional part to integer by
     * multiplying by a factor of 10
     */
- fracpart = round((pow10(max)) * (ufvalue - intpart));
+ fracpart = roundit((pow10(max)) * (ufvalue - intpart));

    if (fracpart >= pow10(max)) {
       intpart++;
Steps To ReproduceCompile on Solaris 10 Sparc.
Tagscompile solaris

Activities

bruno-at-bareos

bruno-at-bareos

2023-07-19 11:40

manager   ~0005229

the function has been renamed to roundittoint this bug seems to have been forget.

Issue History

Date Modified Username Field Change
2019-11-03 18:52 rjung New Issue
2019-11-03 18:52 rjung Tag Attached: compile solaris
2023-07-19 11:40 bruno-at-bareos Assigned To => bruno-at-bareos
2023-07-19 11:40 bruno-at-bareos Status new => closed
2023-07-19 11:40 bruno-at-bareos Resolution open => fixed
2023-07-19 11:40 bruno-at-bareos Note Added: 0005229