summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 65727a45f8..d5caff3ae8 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -13,6 +13,10 @@
#include <tchar.h>
#ifdef __GNUC__
#define Win32_Winsock
+# ifdef __cplusplus
+#undef __attribute__ /* seems broken in 2.8.0 */
+#define __attribute__(p)
+# endif
#endif
#include <windows.h>
@@ -2022,7 +2026,7 @@ XS(w32_DomainName)
char dname[256];
DWORD dnamelen = sizeof(dname);
SID_NAME_USE snu;
- if (LookupAccountName(NULL, name, &sid, &sidlen,
+ if (LookupAccountName(NULL, name, (PSID)&sid, &sidlen,
dname, &dnamelen, &snu)) {
XSRETURN_PV(dname); /* all that for this */
}