[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#548960: fails to build with newer eglibc (local definition of round)



Package: fbb
Version: 7.04j-8
Severity: normal
Tags: patch

Hi,

thanks for maintaining fbb.

During Ubuntu's rebuild test, fbb failed to build with gcc-4.4 in conjunction
with a newer eglibc [1].

The reason is that eglibc nowadays defines round (as per C99).

A simple fix is to simply use round from <math.h>, eradicating the local
definition. Probably better is to check for round with feature_test_macros.

The attached patch simply removes the local definition. Admitted, I haven't 
checked if this does build on unstable yet :(.

Cheers,
    Stefan.

[1]:
<http://launchpadlibrarian.net/31645656/buildlog_ubuntu-karmic-amd64.fbb_7.04j-8_FAILEDTOBUILD.txt.gz>

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-10-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- fbb-7.04j.orig/src/trajec.c
+++ fbb-7.04j/src/trajec.c
@@ -110,8 +110,6 @@
 
 static double julien (double, int, int, int, int, int);
 
-static int round (double);
-
 static long julien_to_pc (double);
 
 static void calc1_trajec (void);
@@ -127,15 +125,6 @@
 static void satpos (void);
 static void satsta (void);
 
-
-static int round (double val)
-{
-	if (val > 0.0)
-		return ((int) (val + 0.5));
-	else
-		return ((int) (val - 0.5));
-}
-
 static double julien (double d3, int n3, int y3, int h3, int m3, int s3)
 {
 	double j8;

Reply to: