diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-01-15 16:37:19 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2011-01-15 16:37:19 -0800 |
commit | 992b4de5896e01316d315a7aef57e7c0ed0aca7b (patch) | |
tree | 741eb8b2b0e4e165256f4bdeaea03514a97c7ee6 /recipes/tgt/tgt-1.0.12 | |
parent | 2bdfe8519eda8067845019a699acdf19a21ba380 (diff) | |
download | openembedded-992b4de5896e01316d315a7aef57e7c0ed0aca7b.tar.gz |
tgt_1.0.12.bb: Fix build on uclibc
* Uclibc does not provide posix_fallocate so use ftruncate
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/tgt/tgt-1.0.12')
-rw-r--r-- | recipes/tgt/tgt-1.0.12/use-ftruncate-on-uclibc.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes/tgt/tgt-1.0.12/use-ftruncate-on-uclibc.patch b/recipes/tgt/tgt-1.0.12/use-ftruncate-on-uclibc.patch new file mode 100644 index 0000000000..e9b6e38353 --- /dev/null +++ b/recipes/tgt/tgt-1.0.12/use-ftruncate-on-uclibc.patch @@ -0,0 +1,18 @@ +Index: tgt-1.0.12/usr/tgtimg.c +=================================================================== +--- tgt-1.0.12.orig/usr/tgtimg.c 2011-01-15 16:28:30.488656000 -0800 ++++ tgt-1.0.12/usr/tgtimg.c 2011-01-15 16:35:14.958656001 -0800 +@@ -438,8 +438,13 @@ + perror("Failed creating file"); + exit(2); + } ++#ifndef __UCLIBC__ + if (posix_fallocate(fd, 0, size*1024*1024LL) == -1) { + perror("posix_fallocate failed."); ++#else ++ if (ftruncate (fd, size*1024*1024LL) == -1) { ++ perror("ftruncate failed."); ++#endif + exit(3); + } + |