sortix-mirror/ports/xz/xz.patch

92 lines
3.6 KiB
Diff

diff -Paur --no-dereference -- xz.upstream/configure xz/configure
--- xz.upstream/configure
+++ xz/configure
@@ -16829,7 +16829,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_includedir"; then
- INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ INCICONV="${INCICONV}${INCICONV:+ }"
fi
fi
fi
@@ -16876,7 +16876,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
- LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }"
fi
fi
haveit=
@@ -16897,7 +16897,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
- LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }"
fi
fi
fi
@@ -17772,7 +17772,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_includedir"; then
- INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ INCINTL="${INCINTL}${INCINTL:+ }"
fi
fi
fi
@@ -17819,7 +17819,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
- LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }"
fi
fi
haveit=
@@ -17840,7 +17840,7 @@
done
if test -z "$haveit"; then
if test -d "$additional_libdir"; then
- LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }"
fi
fi
fi
@@ -19269,6 +19269,7 @@
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|| defined(__DJGPP__) || defined(__VMS) \
+ || defined(__sortix__) \
|| defined(AMIGA) || defined(__AROS__) || defined(__QNX__)
int main(void) { return 0; }
#else
diff -Paur --no-dereference -- xz.upstream/src/common/tuklib_physmem.c xz/src/common/tuklib_physmem.c
--- xz.upstream/src/common/tuklib_physmem.c
+++ xz/src/common/tuklib_physmem.c
@@ -70,6 +70,11 @@
// This sysinfo() is Linux-specific.
#elif defined(TUKLIB_PHYSMEM_SYSINFO)
# include <sys/sysinfo.h>
+
+// Sortix
+#elif defined(__sortix__)
+# include <memusage.h>
+
#endif
@@ -210,6 +215,10 @@
struct sysinfo si;
if (sysinfo(&si) == 0)
ret = (uint64_t)si.totalram * si.mem_unit;
+#elif defined(__sortix__)
+ size_t statistic = MEMUSAGE_TOTAL;
+ memusage(&statistic, &statistic, 1);
+ ret = statistic;
#endif
return ret;