I'm new to osx and I have some problems.I tried to makefile but come up with:
error: unknown type name 'u_char'; did you mean 'char'?
I referred to C PCAP library unknown types error ,add -D_BSD_SOURCE
CFLAGS to my makefile, but it doesn't help.What am I missing?
EDIT:
This is the code which produces the error:
char *computePwd(const u_char *md5) {
static char buf[16];
unsigned char tmp[40];
int tmpl=0;
tmpl = strlen(userName);
strcpy((char*)tmp, userName);
memcpy(tmp + tmpl, md5, 16);
tmpl += 16;
memcpy(buf, ComputeHash(tmp, tmpl), 16);
memset(tmp, 0, 16);
strcpy((char*)tmp, password);
int i;
for (i=0; i<16; ++i)
buf[i] ^= tmp[i];
return buf;
}