From: egonk Date: Fri, 31 Jul 2015 15:16:30 +0000 (+0200) Subject: Fix crash in libecho.c on win64 build X-Git-Tag: krb5-1.14-alpha1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35cb760ab5289b29faebc7ecb4b5d8d0315ceae4;p=thirdparty%2Fkrb5.git Fix crash in libecho.c on win64 build Return value of _findfirst is intptr_t; see https://msdn.microsoft.com/en-us/library/zyzxfzac.aspx [ghudson@mit.edu: also fix plugins.c] ticket: 8230 --- diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c index 826390976a..b0bb2ada87 100644 --- a/src/util/support/plugins.c +++ b/src/util/support/plugins.c @@ -96,7 +96,7 @@ struct dirent { }; typedef struct { - long handle; /* _findfirst/_findnext handle */ + intptr_t handle; /* _findfirst/_findnext handle */ short offset; /* offset into directory */ short finished; /* 1 if there are not more files */ struct _finddata_t fileinfo;/* from _findfirst/_findnext */ @@ -108,7 +108,7 @@ DIR * opendir(const char *dir) { DIR *dp; char *filespec; - long handle; + intptr_t handle; int index; filespec = malloc(strlen(dir) + 2 + 1); diff --git a/src/util/windows/libecho.c b/src/util/windows/libecho.c index a10eee2323..f42462491e 100644 --- a/src/util/windows/libecho.c +++ b/src/util/windows/libecho.c @@ -38,7 +38,7 @@ main(int argc, char *argv[]) void echo_files(char *prefix, char *f) { - long ff; + intptr_t ff; struct _finddata_t fdt; char *slash; char filepath[256];