cups: Include TargetConditionals.h on Darwin

This commit is contained in:
toonn 2021-06-27 12:50:44 +02:00 committed by Jonathan Ringer
parent d0c5ac2383
commit 5a12a87aed
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,29 @@
From 1204c841999808ba27267a0039777dcbccdcd6e3 Mon Sep 17 00:00:00 2001
From: toonn <toonn@toonn.io>
Date: Sun, 27 Jun 2021 12:30:08 +0200
Subject: [PATCH] TargetConditionals
---
test/ippserver.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/ippserver.c b/test/ippserver.c
index 38b304f..68ccab1 100644
--- a/test/ippserver.c
+++ b/test/ippserver.c
@@ -25,7 +25,11 @@
* Include necessary headers...
*/
-#include <config.h> /* CUPS configuration header */
+#ifdef __APPLE__
+# include <xcode/config.h> /* CUPS configuration header macOS */
+#else
+# include <config.h> /* CUPS configuration header */
+#endif /* __APPLE__ */
#include <cups/cups.h> /* Public API */
#include <cups/string-private.h> /* CUPS string functions */
#include <cups/thread-private.h> /* For multithreading functions */
--
2.17.2 (Apple Git-113)

View file

@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" "man" ];
patches = lib.optional (version == "2.2.6") ./0001-TargetConditionals.patch;
postPatch = ''
substituteInPlace cups/testfile.c \
--replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'