--- ncbi/api/asn2gnb2.c.orig	2021-05-21 18:31:24.000000000 -0700
+++ ncbi/api/asn2gnb2.c	2021-05-21 18:32:09.000000000 -0700
@@ -56,6 +56,7 @@
 #include <edutil.h>
 #include <alignmgr2.h>
 #include <asn2gnbi.h>
+#include <ffprint.h>

 #ifdef WIN_MAC
 #if __profile__
--- ncbi/api/salutil.c.orig	2021-05-21 17:33:10.000000000 -0700
+++ ncbi/api/salutil.c	2021-05-21 17:33:34.000000000 -0700
@@ -51,6 +51,7 @@
 #include <edutil.h>
 #include <sequtil.h>
 #include <sqnutils.h>
+#include <alignmgr2.h>

 #ifdef SALSA_DEBUG
 #include <simutil.h>
--- ncbi/network/wwwblast/Src/viewgif.c.orig	2021-05-21 17:34:12.000000000 -0700
+++ ncbi/network/wwwblast/Src/viewgif.c	2021-05-21 17:34:39.000000000 -0700
@@ -45,6 +45,7 @@
 #include <string.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <unistd.h>


 static void SigAlrmHandler(int);
--- ncbi/network/wwwblast/Src/wblast2.c.orig	2021-05-21 17:35:19.000000000 -0700
+++ ncbi/network/wwwblast/Src/wblast2.c	2021-05-21 17:36:02.000000000 -0700
@@ -296,6 +296,9 @@
 #include <algo/blast/api/twoseq_api.h>
 #endif

+#include <algo/blast/core/blast_util.h>
+#include <accid1.h>
+
 #define MY_BLOSUM62 0
 #define MY_PAM30 1
 #define MY_PAM70 2
--- ncbi/corelib/ncbimisc.c.orig	2021-05-21 18:20:30.000000000 -0700
+++ ncbi/corelib/ncbimisc.c	2021-05-21 18:20:54.000000000 -0700
@@ -1266,7 +1266,7 @@
   if (len < 1) return NULL;

   rsult = (Nlm_CharPtr) MemNew (len + 3);
-  if (rsult == NULL) return;
+  if (rsult == NULL) return NULL;
   tmp = rsult;

   for (i = 0; /* local [i] != NULL */ i < numitems; i++) {
--- ncbi/make/makedis.csh	23 Mar 2009 17:10:14 -0000
+++ ncbi/make/makedis.csh	9 Nov 2009 18:44:01 -0000
@@ -240,7 +240,7 @@
 		endif
 	endif
 	set HAVE_MOTIF=0
-	set HAVE_MAC=1
+	# set HAVE_MAC=1
 	breaksw
 case NetBSD:
 	set platform=netbsd
--- ncbi/corelib/ncbimain.c.orig	2002-07-09 09:20:17
+++ ncbi/corelib/ncbimain.c	2024-09-18 14:28:01
@@ -75,7 +75,7 @@
 *     setups argc and argv
 *
 *****************************************************************************/
-#ifdef OS_MSWIN
+#if defined OS_MSWIN || defined OS_UNIX_DARWIN
 int
 #endif
 main(int argc, char *argv[])
--- ncbi/tools/kappa.c.orig	2012-04-30 06:45:01
+++ ncbi/tools/kappa.c	2024-09-18 14:58:32
@@ -2197,7 +2197,7 @@
 /**
  * Callbacks used by Blast_RedoOneMatch and
  * Blast_RedoOneMatchSmithWaterman */
-static const Blast_RedoAlignCallbacks
+static const Blast_RedoAlignCallbacks *
 redo_align_callbacks = {
     Kappa_CalcLambda,
     Kappa_SequenceGetRange,
--- ncbi/tools/ncbisort.c.orig	2006-05-10 14:47:17
+++ ncbi/tools/ncbisort.c	2024-09-18 14:40:01
@@ -689,7 +689,7 @@
    of the fraction.  Strings not of this form are considered to be zero. */
 static Int4 SORTFracCompare(register UcharPtr a, register UcharPtr b)
 {
-  register tmpa = UCHAR(*a), tmpb = UCHAR(*b);
+  register int tmpa = UCHAR(*a), tmpb = UCHAR(*b);

   if (tmpa == '.' && tmpb == '.') {
     do
--- ncbi/tools/pattern1.c.orig	2006-08-04 15:11:17
+++ ncbi/tools/pattern1.c	2024-09-18 14:42:18
@@ -741,7 +741,7 @@

 /*Do a word-by-word bit-wise or of a and b and put the result in
   result; return 1 if there are any non-zero words*/
-static and(Int4 *result, Int4 *a, Int4 *b, patternSearchItems *patternSearch)
+static Int4 and(Int4 *result, Int4 *a, Int4 *b, patternSearchItems *patternSearch)
 {
     Int4 i; /*index over words*/
     Int4 returnValue = 0;
--- ncbi/api/asn2ff4.c.orig	2001-10-02 10:13:15
+++ ncbi/api/asn2ff4.c	2024-09-18 14:36:13
@@ -1344,7 +1344,7 @@
 *	Compare two ImpFeats by name and location
 *	returns 1 for matching features otherwise returns 0
 ******************************************************************************/
-static CmpImpFeat (ImpFeatPtr f1, ImpFeatPtr f2)
+static int CmpImpFeat (ImpFeatPtr f1, ImpFeatPtr f2)
 {
     if (f1 == NULL && f2)
 		return 0;
--- ncbi/api/asn2ff2.c.orig	2024-09-18 22:02:18
+++ ncbi/api/asn2ff2.c	2024-09-18 22:36:29
@@ -220,6 +220,7 @@
 #include <utilpub.h>
 #include <ffprint.h>
 #include <seqmgr.h>
+#include <stdbool.h>
 
 
 NLM_EXTERN Int2 GetGenDate PROTO ((Asn2ffJobPtr ajp, GBEntryPtr gbp, CharPtr buffer));
@@ -1355,7 +1356,7 @@
 	return newstring;
 }
 
-static ChoicePID(SeqIdPtr sid) 
+static bool ChoicePID(SeqIdPtr sid) 
 {
 	
 	DbtagPtr db;