]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix crash in libecho.c on win64 build
authoregonk <egonk@users.noreply.github.com>
Fri, 31 Jul 2015 15:16:30 +0000 (17:16 +0200)
committerGreg Hudson <ghudson@mit.edu>
Mon, 10 Aug 2015 16:51:32 +0000 (12:51 -0400)
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

src/util/support/plugins.c
src/util/windows/libecho.c

index 826390976ab8f2d31f8996dd9fcb6704a6431477..b0bb2ada87558bd150694c5bdbbd56a5837020ee 100644 (file)
@@ -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);
index a10eee2323f44350b4db9939bdb380ec76597455..f42462491ec70bbb3bd3f5e2200301df18b642cc 100644 (file)
@@ -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];