blob: 75a1574021bfaf1523e1ee97a5268f6331ff10d4 [file] [log] [blame] [edit]
--- src/editrights/main.c.orig 2014-10-31 19:49:43.000000000 +0100
+++ src/editrights/main.c 2015-04-26 10:37:44.997236000 +0200
@@ -38,8 +38,12 @@
#include <strings.h>
#include <wchar.h>
#include <locale.h>
+
+#ifdef __CYGWIN__
#include <pwd.h>
#include <grp.h>
+#endif
+
#include <windows.h>
#include <sddl.h>
#include <ntsecapi.h>
@@ -177,6 +181,7 @@
exit (RETURN_ERROR);
}
+#ifdef __CYGWIN__
/* Convert Cygwin username to windows username. */
if ((pw = getpwnam (optUser)) != NULL)
{
@@ -190,6 +195,7 @@
else if ((gr = getgrnam (optUser)) != NULL)
sid_str = gr->gr_passwd;
else
+#endif
{
WCHAR wuser[strlen (optUser) * 2 + 1];
DWORD sid_size = 128, dom_size = 256;