mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
51 lines
1.1 KiB
Diff
51 lines
1.1 KiB
Diff
diff --git a/configure b/configure
|
|
index a2f54b8..8c603b3 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -191,6 +191,9 @@ SunOS)
|
|
oss=yes
|
|
fi
|
|
;;
|
|
+Haiku)
|
|
+haiku="yes"
|
|
+;;
|
|
*)
|
|
oss="yes"
|
|
linux="yes"
|
|
@@ -336,7 +339,7 @@ for opt do
|
|
esac
|
|
done
|
|
|
|
-if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
|
|
+if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" -o "$haiku" = "yes" ] ; then
|
|
AIOLIBS=
|
|
else
|
|
# Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
|
|
@@ -375,8 +378,8 @@ case "$cpu" in
|
|
ARCH_CFLAGS="-march=z900"
|
|
;;
|
|
i386)
|
|
- ARCH_CFLAGS="-m32"
|
|
- ARCH_LDFLAGS="-m32"
|
|
+# ARCH_CFLAGS="-m32"
|
|
+# ARCH_LDFLAGS="-m32"
|
|
;;
|
|
x86_64)
|
|
ARCH_CFLAGS="-m64"
|
|
diff --git a/qemu-img.c b/qemu-img.c
|
|
index 309a746..2386497 100644
|
|
--- a/qemu-img.c
|
|
+++ b/qemu-img.c
|
|
@@ -593,7 +593,11 @@ static int64_t get_allocated_file_size(const char *filename)
|
|
struct stat st;
|
|
if (stat(filename, &st) < 0)
|
|
return -1;
|
|
+#ifdef __HAIKU__
|
|
+ return st.st_size;
|
|
+#else
|
|
return (int64_t)st.st_blocks * 512;
|
|
+#endif
|
|
}
|
|
#endif
|
|
|