panfrost: add missing dependency on midgard_pack.h
[mesa.git] / src / util / process_test.c
index 708c2766eb97f45d7d7ee1fd69c796a910f2d0ea..ef7e2b4d4ad293fce937b226ae61b36c33dc1416 100644 (file)
 #include <limits.h>
 #include <stdlib.h>
 
+#if DETECT_OS_WINDOWS && !defined(PATH_MAX)
+#include <windows.h>
+#define PATH_MAX MAX_PATH
+#endif
+
 bool error = false;
 
 static void
@@ -70,6 +75,11 @@ test_util_get_process_exec_path (void)
       error = true;
       return;
    }
+#ifdef __CYGWIN__
+   int i = strlen(build_path) - 4;
+   if ((i > 0) && (strcmp(&build_path[i], ".exe") == 0))
+      build_path[i] = 0;
+#endif
    expect_equal_str(build_path, path, "util_get_process_name");
 }