]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
ext2fs: fix undeclared posix_memalign() warning
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 11 Jun 2011 15:04:42 +0000 (11:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 11 Jun 2011 15:04:42 +0000 (11:04 -0400)
commit1ac2aa23ef030863f51fc77b42715e173967c44d
tree2c5156647d530f37d482af455813d8673b47609d
parentcf5301d7f2c3bbed3d26600335102414cbf0c4ba
ext2fs: fix undeclared posix_memalign() warning

Older distros do not define posix_memalign() by default in the
headers.  If ext2fs.h is included early in the headers, it is
possible to "#define _XOPEN_SOURCE 600" so that the stdlib.h
header will define it, but if ext2fs.h is included after stdlib.h
there is no posix_memalign() declaration.

Add a posix_memalign() declaration if stdlib.h didn't do it.  This
is a bit of a hack for GNU headers, but it works on Linux and OS/X
without problems.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h