]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip,compat: INFINITY and NAN undefined
authorKevin Harwell <kharwell@digium.com>
Tue, 28 Jan 2014 20:42:41 +0000 (20:42 +0000)
committerKevin Harwell <kharwell@digium.com>
Tue, 28 Jan 2014 20:42:41 +0000 (20:42 +0000)
On some systems the values for INFINITY and NAN are not defined thus causing
a build error on those systems.  Added definitions for those if they had
not previously been defined.

(closes issue ASTERISK-23056)
Reported by: capouch
Patches:
     inf-nan-patch.txt uploaded by capouch (license 6564)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/compat.h
res/res_pjsip/include/res_pjsip_private.h

index e5147cbde852a64de96708987b9e034fb267bba8..c9c99c150cfe19c8b2a556afae89cc0db0d1ac7a 100644 (file)
@@ -224,4 +224,12 @@ float roundf(float x);
 #endif
 #endif
 
+#ifndef INFINITY
+#define INFINITY (1.0/0.0)
+#endif
+
+#ifndef NAN
+#define NAN (0.0/0.0)
+#endif
+
 #endif
index a2d1c6eb468b078fe9a63898a1c2d8280cfbd3be..aee6e3e3ffe2f5b18ea47b67076f9d351e7ec67f 100644 (file)
@@ -9,6 +9,7 @@
 #define RES_PJSIP_PRIVATE_H_
 
 #include "asterisk/module.h"
+#include "asterisk/compat.h"
 
 struct ao2_container;
 struct ast_threadpool_options;