···11-From 7e75779eaeacdbb46a387a59d9aaf1481a1da3e5 Mon Sep 17 00:00:00 2001
22-From: Adrian Gierakowski <agierakowski@gmail.com>
33-Date: Sun, 19 Jul 2020 08:38:05 +0100
44-Subject: [PATCH] fix dirent64 et al on darwin
55-66----
77- configure.ac | 11 +++++++++++
88- 1 file changed, 11 insertions(+)
99-1010-diff --git a/configure.ac b/configure.ac
1111-index b8faca9..cee1e4d 100644
1212---- a/configure.ac
1313-+++ b/configure.ac
1414-@@ -139,6 +139,7 @@ if test "$ac_cv_func_signal" != yes; then
1515- [klibc has bsd_signal instead of signal])])
1616- fi
1717-1818-+dnl TODO: stat64 is deprecated since macOS 10.6
1919- dnl Check for stat64 (dietlibc/klibc).
2020- AC_CHECK_FUNC(stat64,, [
2121- AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
2222-@@ -155,6 +156,16 @@ AC_CHECK_FUNC(open64,, [
2323- AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit])
2424- ])
2525-2626-+dnl OS X apparently has stat64 but not readdir64.
2727-+AC_CHECK_FUNC(readdir64,, [
2828-+ AC_DEFINE(readdir64, readdir, [64-bit operations are the same as 32-bit])
2929-+])
3030-+
3131-+dnl OS X apparently has stat64 but not dirent64.
3232-+AC_CHECK_TYPE(struct dirent64,, [
3333-+ AC_DEFINE(dirent64, dirent, [64-bit operations are the same as 32-bit])
3434-+],[#include <dirent.h>])
3535-+
3636- dnl Check if struct stat has st_mtim.
3737- AC_MSG_CHECKING(for stat::st_mtim)
3838- AC_COMPILE_IFELSE(
3939---
4040-2.15.1
4141-
···18181919 makeFlags = [ "AR=${stdenv.cc.bintools.targetPrefix}ar" ];
20202121+ # Work around error from <stdio.h> on aarch64-darwin:
2222+ # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
2323+ # TODO: this should probably be fixed at a lower level than this?
2424+ NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-undef-prefix";
2525+2126 meta = {
2227 description = "A client for the WHOIS protocol allowing you to query the owner of a domain name";
2328 homepage = "https://www.gnu.org/software/jwhois/";
+8-2
pkgs/tools/package-management/rpm/default.nix
···3636 "--sharedstatedir=/com"
3737 ];
38383939- # Small fixes for ndb on darwin
4040- # https://github.com/rpm-software-management/rpm/pull/1465
4139 patches = [
4040+ # Small fixes for ndb on darwin
4141+ # https://github.com/rpm-software-management/rpm/pull/1465
4242 (fetchpatch {
4343 name = "darwin-support.patch";
4444 url = "https://github.com/rpm-software-management/rpm/commit/2d20e371d5e38f4171235e5c64068cad30bda557.patch";
4545 sha256 = "0p3j5q5a4hl357maf7018k3826jhcpqg6wfrnccrkv30g0ayk171";
4646+ })
4747+ # Fix build on aarch64-darwin
4848+ # https://github.com/rpm-software-management/rpm/pull/1775
4949+ (fetchpatch {
5050+ url = "https://github.com/emilazy/rpm/commit/45120e756930b4787ea2e06fb8a9e623ea13f2f3.patch";
5151+ sha256 = "0zzblwx9apxyjsri4cxd09y9b2hs57r2fck98939j1qgcwy732ar";
4652 })
4753 ];
4854