1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/net/sipxportlib/files/patch-src_utl_UtlContainable.cpp
Martin Wilke 0caefd3bc6 - Fix build with gcc 4.1
Notes:
        sipxportlib contains numerous cases of casting a pointer
        to an int.  Gcc 4.1 does not like this on amd64 systems.
        I have silenced the compilation error by first typecasting
        through a uintptr_t.  This does not fix any underlying
        problems, but at least the code compiles.

Approved by:	maintainer
2007-04-09 17:29:42 +00:00

20 lines
552 B
C++

--- src/utl/UtlContainable.cpp.orig Sat Apr 7 17:08:53 2007
+++ src/utl/UtlContainable.cpp Sat Apr 7 17:09:20 2007
@@ -8,6 +8,7 @@
// SYSTEM INCLUDES
#include <string.h>
+#include <stdint.h>
// APPLICATION INCLUDES
#include "utl/UtlContainable.h"
@@ -60,7 +61,7 @@
/// Provides a hash function that uses the object pointer as the hash value.
unsigned UtlContainable::directHash() const
{
- return (unsigned) this;
+ return (unsigned) ((uintptr_t)this);
}
/// Provides a hash function appropriate for null-terminated string values.