cups: Include TargetConditionals.h on Darwin

authored by toonn and committed by Jonathan Ringer 5a12a87a d0c5ac23

+31
+29
pkgs/misc/cups/0001-TargetConditionals.patch
··· 1 + From 1204c841999808ba27267a0039777dcbccdcd6e3 Mon Sep 17 00:00:00 2001 2 + From: toonn <toonn@toonn.io> 3 + Date: Sun, 27 Jun 2021 12:30:08 +0200 4 + Subject: [PATCH] TargetConditionals 5 + 6 + --- 7 + test/ippserver.c | 6 +++++- 8 + 1 file changed, 5 insertions(+), 1 deletion(-) 9 + 10 + diff --git a/test/ippserver.c b/test/ippserver.c 11 + index 38b304f..68ccab1 100644 12 + --- a/test/ippserver.c 13 + +++ b/test/ippserver.c 14 + @@ -25,7 +25,11 @@ 15 + * Include necessary headers... 16 + */ 17 + 18 + -#include <config.h> /* CUPS configuration header */ 19 + +#ifdef __APPLE__ 20 + +# include <xcode/config.h> /* CUPS configuration header macOS */ 21 + +#else 22 + +# include <config.h> /* CUPS configuration header */ 23 + +#endif /* __APPLE__ */ 24 + #include <cups/cups.h> /* Public API */ 25 + #include <cups/string-private.h> /* CUPS string functions */ 26 + #include <cups/thread-private.h> /* For multithreading functions */ 27 + -- 28 + 2.17.2 (Apple Git-113) 29 +
+2
pkgs/misc/cups/default.nix
··· 40 40 41 41 outputs = [ "out" "lib" "dev" "man" ]; 42 42 43 + patches = lib.optional (version == "2.2.6") ./0001-TargetConditionals.patch; 44 + 43 45 postPatch = '' 44 46 substituteInPlace cups/testfile.c \ 45 47 --replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'