avoid a warning with Xcode build

This commit is contained in:
nhmall
2026-03-22 11:33:26 -04:00
parent 8ee179a594
commit f9cebc5890
+10 -2
View File
@@ -936,11 +936,17 @@ case_insensitive_comp(const char *s1, const char *s2)
return u1 - u2; return u1 - u2;
} }
#if defined(MACOS)
#define RETTYPE ssize_t
#else
#define RETTYPE int
#endif
boolean boolean
copy_bytes(int ifd, int ofd) copy_bytes(int ifd, int ofd)
{ {
char buf[BUFSIZ]; char buf[BUFSIZ];
int nfrom, nto; RETTYPE nfrom, nto;
do { do {
nto = 0; nto = 0;
@@ -950,9 +956,11 @@ copy_bytes(int ifd, int ofd)
nto = write(ofd, buf, nfrom); nto = write(ofd, buf, nfrom);
if (nto != nfrom || nfrom < 0) if (nto != nfrom || nfrom < 0)
return FALSE; return FALSE;
} while (nfrom == BUFSIZ); } while (nfrom == (RETTYPE) BUFSIZ);
return TRUE; return TRUE;
} }
#undef RETTYPE
#define MAX_D 5 #define MAX_D 5
struct datamodel_information { struct datamodel_information {
int sz[MAX_D]; int sz[MAX_D];