[xbuild] Log build errors and raise events even if a build fails.
[mono.git] / mono / io-layer / security.c
index c19c02b3c993288ecdb76f63c03987a4713fd720..1d702d3188f274c02c319c8f3d59bc805d9ccbf4 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <string.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 
@@ -34,7 +35,7 @@
 gboolean 
 ImpersonateLoggedOnUser (gpointer handle)
 {
-       uid_t token = (uid_t) handle;
+       uid_t token = (uid_t) GPOINTER_TO_INT (handle);
 #ifdef HAVE_SETRESUID
        if (setresuid (-1, token, getuid ()) < 0)
                return FALSE;