1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r10461: fixed tdb build on systems without stdint.h

This commit is contained in:
Andrew Tridgell 2005-09-24 02:39:09 +00:00 committed by Gerald (Jerry) Carter
parent bce35ad237
commit 83168c7e76

View File

@ -136,7 +136,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
struct tdb_context *tdb;
struct stat st;
int rev = 0, locked = 0;
uint8_t *vp;
unsigned char *vp;
u32 vertest;
if (!(tdb = calloc(1, sizeof *tdb))) {
@ -222,7 +222,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
}
rev = (tdb->flags & TDB_CONVERT);
}
vp = (uint8_t *)&tdb->header.version;
vp = (unsigned char *)&tdb->header.version;
vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) |
(((u32)vp[2]) << 8) | (u32)vp[3];
tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0;