pkgsrc/sysutils/heirloom-doc/patches/patch-ap
cheusov c02ca0f45e The Heirloom Project provides traditional implementations of standard
Unix utilities. In many cases, they have been derived from original
Unix material released as Open Source by Caldera and Sun.
2011-05-27 22:57:42 +00:00

31 lines
945 B
Text

$NetBSD: patch-ap,v 1.1.1.1 2011/05/27 22:57:42 cheusov Exp $
Fix for Interix 3.5
--- libcommon/memalign.c.orig Sun Jan 22 21:06:14 2006
+++ libcommon/memalign.c
@@ -21,9 +21,6 @@
*/
/* Sccsid @(#)memalign.c 1.7 (gritter) 1/22/06 */
-#if defined (__FreeBSD__) || defined (__dietlibc__) || defined (_AIX) || \
- defined (__NetBSD__) || defined (__OpenBSD__) || \
- defined (__DragonFly__) || defined (__APPLE__)
/*
* FreeBSD malloc(3) promises to page-align the return of malloc() calls
* if size is at least a page. This serves for a poor man's memalign()
@@ -34,6 +31,7 @@
#include "memalign.h"
+#if defined (HAVE_NO_MEMALIGN)
void *
memalign(size_t alignment, size_t size)
{
@@ -47,5 +45,5 @@ memalign(size_t alignment, size_t size)
size = pagesize;
return malloc(size);
}
-#endif /* __FreeBSD__ || __dietlibc__ || _AIX || __NetBSD__ || __OpenBSD__ ||
- __DragonFly__ || __APPLE__ */
+#endif /* HAVE_NO_MEMALIGN */
+