#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <sys/mman.h>
typedef unsigned int DWORD;
typedef unsigned short WORD;
SIVAL(&sid->sub_auths[i], 0, auth);
i++;
- lstr = strchr(lstr + 1, '-');
+ lstr = (const unsigned char *)strchr(lstr + 1, '-');
}
return 1;
}
+#if 0
+
/*
* Replace SID1, component by component with SID2
* Assumes will never be called with unequal length SIDS
}
}
+#endif
+
static void print_sid(DOM_SID *sid)
{
int i, comps = sid->num_auths;
* dealing with the records. We are interested in the sk record
*/
start = 0;
+
+#ifdef HAVE_MMAP
base = mmap(&start, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+#else
+ base = (char *)-1;
+ errno = ENOSYS;
+#endif
if ((int)base == -1) {
fprintf(stderr, "Could not mmap file: %s, %s\n", poptPeekArg(pc),
sk_hdr = (SK_HDR *)(base + OFF(IVAL(&sk_hdr->prev_off, 0)));
} while (sk_off != first_sk_off);
+#ifdef HAVE_MMAP
munmap(base, sbuf.st_size);
+#endif
poptFreeContext(pc);