File: solaris.c

package info (click to toggle)
fio 1.38-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,108 kB
  • ctags: 2,240
  • sloc: ansic: 17,668; makefile: 98; sh: 55
file content (16 lines) | stat: -rw-r--r-- 310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdlib.h>
#include <errno.h>
#include "compiler/compiler.h"

/*
 * Some Solaris versions don't have posix_memalign(), provide a private
 * weak alternative
 */
int __weak posix_memalign(void **ptr, size_t align, size_t size)
{
	*ptr = memalign(align, size);
	if (*ptr)
		return 0;

	return ENOMEM;
}