summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-10-22 20:16:15 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-11-24 15:17:13 -0800
commite33c11a5578a7154a80dd680ef3793ded3601144 (patch)
tree48fa33be7e5ce06c1f556de964db1e439af1fa03 /pkgs/os-specific/darwin/apple-source-releases
parent19678c4e90baf5ef384d891298a30876ab20bc89 (diff)
downloadnixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar.gz
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar.bz2
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar.lz
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar.xz
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.tar.zst
nixpkgs-e33c11a5578a7154a80dd680ef3793ded3601144.zip
Libc: Merge TARGET_OS_EMBEDDED patches
Both patches implement the same fix so they'll probably have to be
removed at the same time. This avoids one of them being left behind.
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch (renamed from pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-stdlib-if-not-defined.patch)21
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/0002-Define-TARGET_OS_EMBEDDED-in-stdio-if-not-defined.patch26
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix3
3 files changed, 19 insertions, 31 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-stdlib-if-not-defined.patch b/pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch
index 0464e15c362..2ba67734c54 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-stdlib-if-not-defined.patch
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch
@@ -1,7 +1,7 @@
-From c0ab867bb7888401957539b0348902028a2be6e0 Mon Sep 17 00:00:00 2001
+From 187d0e8847d080790b22724352e51de50d214dd8 Mon Sep 17 00:00:00 2001
 From: toonn <toonn@toonn.io>
 Date: Tue, 27 Jul 2021 15:12:14 +0200
-Subject: [PATCH] Define TARGET_OS_EMBEDDED in stdlib if not defined
+Subject: [PATCH] Define TARGET_OS_EMBEDDED in std{lib,io} if not defined
 
 Originally attempted including `TargetConditionals.h` but this had
 knock-on effects, for example, breaking the zlib build because of
@@ -10,9 +10,24 @@ knock-on effects, for example, breaking the zlib build because of
 This should be the lowest impact solution and corresponds to the default
 behavior IIUC.
 ---
+ include/stdio.h  | 3 +++
  include/stdlib.h | 3 +++
- 1 file changed, 3 insertions(+)
+ 2 files changed, 6 insertions(+)
 
+diff --git a/include/stdio.h b/include/stdio.h
+index d0cf7a5..487496e 100644
+--- a/include/stdio.h
++++ b/include/stdio.h
+@@ -351,6 +351,9 @@ __END_DECLS
+ /* Additional functionality provided by:
+  * POSIX.2-1992 C Language Binding Option
+  */
++#ifndef TARGET_OS_EMBEDDED
++#  define TARGET_OS_EMBEDDED 0
++#endif
+ #if TARGET_OS_EMBEDDED
+ #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
+ #else
 diff --git a/include/stdlib.h b/include/stdlib.h
 index c04d3a7..0b454ba 100644
 --- a/include/stdlib.h
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/0002-Define-TARGET_OS_EMBEDDED-in-stdio-if-not-defined.patch b/pkgs/os-specific/darwin/apple-source-releases/Libc/0002-Define-TARGET_OS_EMBEDDED-in-stdio-if-not-defined.patch
deleted file mode 100644
index 880c80883bf..00000000000
--- a/pkgs/os-specific/darwin/apple-source-releases/Libc/0002-Define-TARGET_OS_EMBEDDED-in-stdio-if-not-defined.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 26a721ca68bb06cb815c49f4ac28bb9de8bb2cba Mon Sep 17 00:00:00 2001
-From: toonn <toonn@toonn.io>
-Date: Tue, 27 Jul 2021 20:03:40 +0200
-Subject: [PATCH 2/2] Define TARGET_OS_EMBEDDED in stdio if not defined
-
----
- include/stdio.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/include/stdio.h b/include/stdio.h
-index d0cf7a5..487496e 100644
---- a/include/stdio.h
-+++ b/include/stdio.h
-@@ -351,6 +351,9 @@ __END_DECLS
- /* Additional functionality provided by:
-  * POSIX.2-1992 C Language Binding Option
-  */
-+#ifndef TARGET_OS_EMBEDDED
-+#  define TARGET_OS_EMBEDDED 0
-+#endif
- #if TARGET_OS_EMBEDDED
- #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
- #else
--- 
-2.17.2 (Apple Git-113)
-
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
index 5a8498a137d..915d3a61f81 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
@@ -4,8 +4,7 @@ appleDerivation' stdenvNoCC {
   nativeBuildInputs = [ ed unifdef ];
 
   patches = [
-    ./0001-Define-TARGET_OS_EMBEDDED-in-stdlib-if-not-defined.patch
-    ./0002-Define-TARGET_OS_EMBEDDED-in-stdio-if-not-defined.patch
+    ./0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch
   ];
 
   # TODO: asl.h actually comes from syslog project now