forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporary fixes to support building Dovecot on aarch64-darwin
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
pkgs/development/libraries/clucene-core/fix-darwin-aarch64.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- a/src/shared/CMakeLists.txt | ||
+++ b/src/shared/CMakeLists.txt | ||
@@ -103,34 +103,20 @@ CHECK_OPTIONAL_FUNCTIONS( wcsupr wcscasecmp wcsicmp wcstoll wprintf lltow | ||
) | ||
|
||
#make decisions about which functions to use... | ||
-CHOOSE_FUNCTION(fileHandleStat "fstati64;_fstati64;fstat64;fstat;_fstat") | ||
+CHOOSE_FUNCTION(fileHandleStat "fstat;_fstat") | ||
IF ( _CL_HAVE_FUNCTION_FSTATI64 OR _CL_HAVE_FUNCTION__FSTATI64 OR _CL_HAVE_FUNCTION_FSTAT64 ) | ||
SET ( USE_STAT64 1 ) | ||
ENDIF ( _CL_HAVE_FUNCTION_FSTATI64 OR _CL_HAVE_FUNCTION__FSTATI64 OR _CL_HAVE_FUNCTION_FSTAT64 ) | ||
|
||
-IF ( USE_STAT64 ) | ||
- CHOOSE_FUNCTION(fileStat "stati64;_stati64;stat64;stat;_stat") | ||
- CHOOSE_FUNCTION(fileSize "filelengthi64;_filelengthi64;filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") | ||
- CHOOSE_FUNCTION(fileSeek "lseeki64;_lseeki64;lseek64;lseek;_lseek") | ||
- CHOOSE_MISC(TYPE_CL_STAT_T | ||
- HAVE_TYPE_CL_STAT_T | ||
- "struct stati64 x\;" "#define cl_stat_t stati64" "stati64" | ||
- "struct _stati64 x\;" "#define cl_stat_t _stati64" "_stati64" | ||
- "struct stat64 x\;" "#define cl_stat_t stat64" "stat64" | ||
- "struct stat x\;" "#define cl_stat_t stat" "stat" | ||
- "struct _stat x\;" "#define cl_stat_t _stat" "_stat" | ||
- ) | ||
-ELSE( USE_STAT64 ) | ||
- #borland doesn't have a fstat64, so we have to fallback to non 64 bit everything... | ||
- CHOOSE_FUNCTION(fileStat "stat;_stat") | ||
- CHOOSE_FUNCTION(fileSize "filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") | ||
- CHOOSE_FUNCTION(fileSeek "lseek;_lseek") | ||
- CHOOSE_MISC(TYPE_CL_STAT_T | ||
- HAVE_TYPE_CL_STAT_T | ||
- "struct stat x\;" "#define cl_stat_t stat" "stat" | ||
- "struct _stat x\;" "#define cl_stat_t _stat" "_stat" | ||
- ) | ||
-ENDIF( USE_STAT64 ) | ||
+#borland doesn't have a fstat64, so we have to fallback to non 64 bit everything... | ||
+CHOOSE_FUNCTION(fileStat "stat;_stat") | ||
+CHOOSE_FUNCTION(fileSize "filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") | ||
+CHOOSE_FUNCTION(fileSeek "lseek;_lseek") | ||
+CHOOSE_MISC(TYPE_CL_STAT_T | ||
+ HAVE_TYPE_CL_STAT_T | ||
+ "struct stat x\;" "#define cl_stat_t stat" "stat" | ||
+ "struct _stat x\;" "#define cl_stat_t _stat" "_stat" | ||
+ ) | ||
|
||
#ftell (and probably soon ftell64) are POSIX standard functions, but tell and | ||
#tell64 are not, so we define fileTell in terms of fileSeek. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters