Package: snack
Version: 2.2.10-dfsg1-8
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu karmic ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following:
* jkFormatMP3.c: #include <math.h> before definition of roundf() to
fix FTBFS (LP: #437336).
We thought you might be interested in doing the same.
The build fails with the following error:
gcc -c -O -fPIC -DUSE_TCL_STUBS -DUSE_TK_STUBS -DOSS -I/usr/include/tcl8.4
-I/usr/include/tcl8.4/tcl-private/generic
-I/usr/include/tcl8.4/tk-private/generic -DTCL_81_API -I./../generic
-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 ./../generic/jkFormatMP3.c
In file included from /usr/include/math.h:94,
from ./../generic/jkFormatMP3.c:1312:
/usr/include/bits/mathcalls.h:310: error: expected declaration specifiers or
'...' before '(' token
/usr/include/bits/mathcalls.h:310: error: conflicting types for 'floor'
http://launchpadlibrarian.net/32334815/buildlog_ubuntu-karmic-i386.snack_2.2.10-dfsg1-8_FAILEDTOBUILD.txt.gz
only in patch2:
unchanged:
--- snack-2.2.10-dfsg1.orig/generic/jkFormatMP3.c
+++ snack-2.2.10-dfsg1/generic/jkFormatMP3.c
@@ -29,6 +29,7 @@
#include "snack.h"
#include "jkFormatMP3.h"
#include <string.h>
+#include <math.h>
#define FRAS2(is,a) ((is) > 0 ? t_43[(is)]*(a):-t_43[-(is)]*(a))
#define MAXFRAMESIZE 2106 /* frame size starting at header */
#define roundf(x) (floor((x)+(float )0.5f))
@@ -1309,8 +1310,6 @@
return len;
}
-#include <math.h>
-
#define PI12 0.261799387f
#define PI36 0.087266462f
#define COSPI3 0.500000000f