1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

Unbreak on amd64 by replacing obsolete memalign() function with POSIX.1d

posix_memalign().

Reported by:	pavmail
This commit is contained in:
Alexey Dokuchaev 2011-11-09 16:00:55 +00:00
parent e1c6649edf
commit 4f89fea7c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285380

View File

@ -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();