void-packages/srcpkgs/monit/patches/cross-fix.patch
2020-07-01 15:15:15 +02:00

43 lines
1.5 KiB
Diff

From e0e14896d7dcf56700b48583e79338c820c35f42 Mon Sep 17 00:00:00 2001
From: Tildeslash <info@tildeslash.com>
Date: Tue, 30 Jun 2020 21:30:28 +0200
Subject: [PATCH] Patch for cross-compile
---
configure.ac | 4 +++-
libmonit/configure.ac | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index f7ea677..a8c32c8 100644
--- configure.ac
+++ configure.ac
@@ -442,7 +442,9 @@ AC_RUN_IFELSE(
#endif
#endif
return 1;
- ])], [CFLAGS="$CFLAGS -std=c11"], [CFLAGS="$CFLAGS -std=c99"])
+ ])], [CFLAGS="$CFLAGS -std=c11"], [CFLAGS="$CFLAGS -std=c99"],
+ [AC_MSG_NOTICE([WARNING: result CFLAGS -std=c11 guessed because of cross compilation])
+ CFLAGS="$CFLAGS -std=c11"])
AC_CHECK_HEADERS([stdint.h stdbool.h], [], [AC_MSG_ERROR([toolchain does not have C99 headers])])
diff --git a/libmonit/configure.ac b/libmonit/configure.ac
index 21ebdd7..8813852 100644
--- libmonit/configure.ac
+++ libmonit/configure.ac
@@ -336,7 +336,9 @@ AC_RUN_IFELSE(
#endif
#endif
return 1;
- ])], [CFLAGS="$CFLAGS -std=c11"], [CFLAGS="$CFLAGS -std=c99"])
+ ])], [CFLAGS="$CFLAGS -std=c11"], [CFLAGS="$CFLAGS -std=c99"],
+ [AC_MSG_NOTICE([WARNING: result CFLAGS -std=c11 guessed because of cross compilation])
+ CFLAGS="$CFLAGS -std=c11"])
AC_CHECK_HEADERS([stdint.h stdbool.h], [], [AC_MSG_ERROR([toolchain does not have C99 headers])])
# ------------------------------------------------------------------------
--
2.10.5