1 |
blueness 15/04/29 16:40:13 |
2 |
|
3 |
Added: nas-1.9.4-remove-abs-fabs.patch |
4 |
Log: |
5 |
Fix build on uclibc. Bug #510766. |
6 |
|
7 |
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: nas-1.9.4-remove-abs-fabs.patch |
16 |
=================================================================== |
17 |
From 212309075d26668f6e25f30754e646952843cf61 Mon Sep 17 00:00:00 2001 |
18 |
From: "Anthony G. Basile" <blueness@g.o> |
19 |
Date: Tue, 28 Apr 2015 18:56:46 -0600 |
20 |
Subject: [PATCH] |
21 |
|
22 |
On a uClibc system, the macro definitions of abs() and fabs() |
23 |
cause the build to fail. Since these are specified by POSIX, it is safe to |
24 |
just drop their definition. This has been tested on uClibc, glibc and musl. |
25 |
|
26 |
See: https://bugs.gentoo.org/show_bug.cgi?id=510766 |
27 |
|
28 |
Signed-off-by: Anthony G. Basile <blueness@g.o> |
29 |
--- |
30 |
server/include/misc.h | 6 ------ |
31 |
1 file changed, 6 deletions(-) |
32 |
|
33 |
diff --git a/server/include/misc.h b/server/include/misc.h |
34 |
index 2267ae0..fb904c8 100644 |
35 |
--- a/server/include/misc.h |
36 |
+++ b/server/include/misc.h |
37 |
@@ -71,12 +71,6 @@ typedef int Bool; |
38 |
|
39 |
#define min(a, b) (((a) < (b)) ? (a) : (b)) |
40 |
#define max(a, b) (((a) > (b)) ? (a) : (b)) |
41 |
-#ifndef abs |
42 |
-#define abs(a) ((a) > 0 ? (a) : -(a)) |
43 |
-#endif |
44 |
-#ifndef fabs |
45 |
-#define fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */ |
46 |
-#endif |
47 |
#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0)) |
48 |
/* this assumes b > 0 */ |
49 |
#define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b) |
50 |
-- |
51 |
2.0.5 |