aboutsummaryrefslogtreecommitdiff
path: root/games/battletanks
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2011-11-09 16:00:55 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2011-11-09 16:00:55 +0000
commit4f89fea7c741be43fc5472d1d28c5db0c15eb7c2 (patch)
tree850962ac902bbc7aa0189e3766f8cad7655b325f /games/battletanks
parente1c6649edf48e1cb8863aca8abf8d880a2f0c31c (diff)
Unbreak on amd64 by replacing obsolete memalign() function with POSIX.1d
posix_memalign(). Reported by: pavmail
Notes
Notes: svn path=/head/; revision=285380
Diffstat (limited to 'games/battletanks')
-rw-r--r--games/battletanks/files/patch-clunk-sse_fft_context.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/games/battletanks/files/patch-clunk-sse_fft_context.cpp b/games/battletanks/files/patch-clunk-sse_fft_context.cpp
new file mode 100644
index 000000000000..4c67c15fb5f3
--- /dev/null
+++ b/games/battletanks/files/patch-clunk-sse_fft_context.cpp
@@ -0,0 +1,18 @@
+--- clunk/sse_fft_context.cpp.orig 2011-11-09 20:57:22.000000000 +0600
++++ clunk/sse_fft_context.cpp 2011-11-09 20:58:53.371320298 +0600
+@@ -1,5 +1,4 @@
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <stdio.h>
+ #include <new>
+ #include "fft_context.h"
+@@ -12,7 +12,8 @@
+ #ifdef _WINDOWS
+ ptr = _aligned_malloc(size, alignment);
+ #else
+- ptr = memalign(alignment, size);
++ if (posix_memalign(&ptr, alignment, size))
++ ptr = NULL;
+ #endif
+ if (ptr == NULL)
+ throw std::bad_alloc();