Skip to content

Commit

Permalink
add patch for macOS aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
tormodatt committed Jan 21, 2022
1 parent 56b0a2d commit d5cdc57
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Formula/rpm.rb
Expand Up @@ -38,6 +38,8 @@ class Rpm < Formula
sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
end

patch :DATA

def install
ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua"
ENV.append "LDFLAGS", "-lomp"
Expand Down Expand Up @@ -133,3 +135,24 @@ def rpmdir(macro)
rpmdir("%_rpmdir")/"noarch/test-1.0-1.noarch.rpm"
end
end

__END__
--- a/misc/fts.c
+++ b/misc/fts.c
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif /* LIBC_SCCS and not lint */

/* Conditional to set up proper fstat64 implementation */
-#if defined(hpux) || defined(sun)
+#if defined(hpux) || defined(sun) || defined(__APPLE__)
# define FTS_FSTAT64(_fd, _sbp) fstat((_fd), (_sbp))
#else
# define FTS_FSTAT64(_fd, _sbp) fstat64((_fd), (_sbp))
@@ -63,6 +63,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif
#if defined(__APPLE__)
# define __errno_location() (__error())
+# define stat64 stat
#endif

#include "system.h"

0 comments on commit d5cdc57

Please sign in to comment.