Commit 699067ae authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

loader: Unbreak FreeBSD builds (ARRAY_SIZE undefined).

Commit af996344 used ARRAY_SIZE in FreeBSD-specifc code which, alas, is not available here, so revert that change.
parent 2f26b02f
......@@ -90,7 +90,7 @@ static const char *get_self_exe( char *argv0 )
static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
size_t path_size = PATH_MAX;
char *path = malloc( path_size );
if (path && !sysctl( pathname, ARRAY_SIZE( pathname ), path, &path_size, NULL, 0 ))
if (path && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), path, &path_size, NULL, 0 ))
return path;
free( path );
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment