Files
nixpkgs/pkgs/by-name/co/coan/fix-big-endian-config-check.diff
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

23 lines
666 B
Diff

diff --git a/configure.ac b/configure.ac
index 23ba6f0..13e6647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ(2.59)
AM_INIT_AUTOMAKE(1.13 no-define)
AC_CHECK_HEADERS(strings.h)
AC_MSG_CHECKING(for big-endian host)
-AC_TRY_RUN([main () {
+AC_TRY_RUN([int main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
@@ -12,7 +12,7 @@ AC_TRY_RUN([main () {
char c[sizeof (long)];
} u;
u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
+ return u.c[sizeof (long) - 1] == 1;
}], BIG_ENDIAN=no, BIG_ENDIAN=yes)
AC_MSG_RESULT([$BIG_ENDIAN])
AM_CONDITIONAL([IS_BIG_ENDIAN],[test "$BIG_ENDIAN" = "yes"])